Skip to content

feat: add renderPageSelect and button tooltip position support to Pagination - #726

Open
patricklx wants to merge 2 commits into
mainfrom
feat/parity-pagination
Open

feat: add renderPageSelect and button tooltip position support to Pagination#726
patricklx wants to merge 2 commits into
mainfrom
feat/parity-pagination

Conversation

@patricklx

Copy link
Copy Markdown
Collaborator

Closes #713

Summary

Brings Ember's Pagination in sync with the React changes since the last parity check (up to a57cf8a):

The other two upstream commits (c0980c4, 51dab56) only touched Storybook controls/VRT stories and have no component-level impact.

Fix in Tooltip

Wrapping the nav buttons (whose disabled state toggles as a result of clicking them) in Tooltip surfaced a latent bug: when a focused, just-clicked button becomes disabled, the browser blurs it synchronously mid-render, and Tooltip's onFocusIn/onFocusOut were setting the tracked open property directly in that window — tripping Ember's "already used in this computation" assertion. Both handlers now defer the update through the runloop's actions queue, which doesn't change any existing Tooltip test's observable behavior (all existing Tooltip tests still pass) but avoids the crash.

Test plan

  • pnpm build succeeds
  • New pagination-test.gts covers default rendering, @backwardText/@forwardText, tooltip position, click navigation, @disabled, and @renderPageSelect
  • Full test-app suite passes (407/407), including all Tooltip tests (no regression from the runloop fix)
  • Added two live-preview docs examples (tooltip position/text customization, custom @renderPageSelect)

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
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
patricklx force-pushed the feat/parity-pagination branch from 6bb7ef6 to 56b355f Compare August 4, 2026 09:15
github-actions Bot pushed a commit that referenced this pull request Aug 4, 2026
…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>
github-actions Bot pushed a commit that referenced this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Parity Check] Update Pagination component

1 participant