-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Adjacent ellipses in PaginationNav #15830
Comments
Thanks for reporting, can confirm this looks off. I think something's wrong within this logic here: carbon/packages/react/src/components/PaginationNav/PaginationNav.tsx Lines 454 to 466 in 754ff79
|
It's clear we don't want the overflows next to one another, but this brings up an interesting question for me: what do we want to happen? Should overflows be limited in certain cases beyond what we already have? What should we be aiming for when we fix this? @carbon-design-system/design do you have any thoughts? |
@tay1orjones It looks like this might be a bug with how the That said, I noticed that the UI should be more uniform in terms of which pages are visible for each active page, regardless of selection method. For example, when clicking on page 10 while page 1 is active, the page changes to 10, but 1 & 2 remain visible. Meanwhile, 8, 9, and 10 are visible with the arrows. Page 1 ActivePage 10 ActiveSeems the solution here would be to get the page list visually consistent for visible pages regardless of the selection method for each active page.Outside of that fix, I have a couple of suggestions that could be implemented in a few steps.
|
When my design team was originally working on this we prototyped a few approaches, including the one outlined by @hollyos. What we noticed during internal user testing was that it is extremely distracting / confusing to users when the width of the component changes while flipping through the pages. It also defeated the reason why we needed such a compact component since if there is enough space to show another item, why not show it initially. I'm referring to these examples:
That's why we opted to include the overflows in the number of items shown when contributing the implementation. |
I feel like Holly and Jan's approach for this makes sense, to try to keep the page list visually consistent for visible pages regardless of the selection method for each active page, and this solution would resolve the problem of having the double ellipsis appearing next to each other in the pagination. Adding this as props is also a good idea, so people can use this if they need more control for their pagination needs. |
Please review the design specs here for this fix |
Completed by #17628 |
Package
@carbon/react
Browser
Chrome, Firefox
Package version
v1.50.0
React version
v17.0.2
Description
Should not have adjacent ellipses in pagination.
Reproduction/example
https://react.carbondesignsystem.com/?path=/story/components-paginationnav--playground&args=itemsShown:4;totalItems:10
Steps to reproduce
Suggested Severity
None
Application/PAL
Cloud Pak for AIOps
Code of Conduct
The text was updated successfully, but these errors were encountered: