feat: add renderPageSelect and button tooltip position support to Pagination - #726
Open
patricklx wants to merge 2 commits into
Open
feat: add renderPageSelect and button tooltip position support to Pagination#726patricklx wants to merge 2 commits into
patricklx wants to merge 2 commits into
Conversation
Contributor
📖 Docs Preview🔗 Preview URL: https://ibm.github.io/carbon-components-ember/pr-previews/pr-726/ Built from commit 14d1e25 |
…ination React added a `renderPageSelect` render-prop for a custom page-selection control and `backwardTextTooltipPosition`/`forwardTextTooltipPosition` to place tooltips on the nav buttons. Mirror both in Ember: `@renderPageSelect` accepts a component replacing the default page Select, and the backward/ forward buttons are now wrapped in the Tooltip component with configurable `@backwardText`/`@forwardText` and position args. Also fixes a latent bug in Tooltip surfaced by this change: disabling a focused trigger (e.g. clicking "previous" until it becomes disabled) makes the browser blur it synchronously mid-render, and CarbonTooltip's onFocusIn/onFocusOut set the tracked `open` property directly in that window, tripping Ember's "already used in this computation" assertion. Defer both through the runloop's actions queue instead. Signed-off-by: Patrick Pircher <patrick.pircher@ibm.com>
patricklx
force-pushed
the
feat/parity-pagination
branch
from
August 4, 2026 09:15
6bb7ef6 to
56b355f
Compare
…le in Tooltip The ember/no-runloop lint rule disallows @ember/runloop imports. scheduleTask from ember-lifeline provides the same actions-queue deferral and auto-cancels on destroy, removing the need for the manual isDestroying check. Signed-off-by: Patrick Pircher <patrick.pircher@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #713
Summary
Brings Ember's
Paginationin sync with the React changes since the last parity check (up toa57cf8a):@renderPageSelect— optional component reference that replaces the default page-select control incds--pagination__right. Receives@currentPage,@totalPages,@currentPageSize,@pageSelectLabelText,@onSetPage, mirroring React'srenderPageSelectrender prop (feat: renderPageSelect support on pagination and deprecation notice for preview/unstable variant carbon-design-system/carbon#22617).@backwardTextTooltipPosition/@forwardTextTooltipPosition— the previous/next buttons are now wrapped in theTooltipcomponent with a configurable@align, matching React's per-button tooltip position (feat: add tooltip position to pagination buttons react carbon-design-system/carbon#22199).@backwardText/@forwardText— new args to customize the aria-label and tooltip content of the nav buttons (default to"Previous page"/"Next page", matching React's defaults). Previously these were hardcoded, lowercase, and not configurable.The other two upstream commits (
c0980c4,51dab56) only touched Storybook controls/VRT stories and have no component-level impact.Fix in
TooltipWrapping the nav buttons (whose
disabledstate toggles as a result of clicking them) inTooltipsurfaced a latent bug: when a focused, just-clicked button becomesdisabled, the browser blurs it synchronously mid-render, andTooltip'sonFocusIn/onFocusOutwere setting the trackedopenproperty directly in that window — tripping Ember's "already used in this computation" assertion. Both handlers now defer the update through the runloop'sactionsqueue, which doesn't change any existingTooltiptest's observable behavior (all existing Tooltip tests still pass) but avoids the crash.Test plan
pnpm buildsucceedspagination-test.gtscovers default rendering,@backwardText/@forwardText, tooltip position, click navigation,@disabled, and@renderPageSelecttest-appsuite passes (407/407), including allTooltiptests (no regression from the runloop fix)@renderPageSelect)🤖 Generated with Claude Code