Skip to content
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

[Feature Request]: Allow to change next and previous icons in PaginationNav #15012

Closed
1 task done
radarfox opened this issue Oct 25, 2023 · 3 comments
Closed
1 task done

Comments

@radarfox
Copy link

radarfox commented Oct 25, 2023

The problem

We would like to migrate from our custom pagination component to PaginationNav. Our custom component uses chevron icons instead of caret icons on previous and next buttons.

The solution

Allow to change next and previous icons, preferably like this:

import { ChevronLeft, ChevronRight } from '@carbon/react/icons';

<PaginationNav renderPreviousIcon={ChevronLeft} renderNextIcon={ChevronRight} />

Examples

https://react.carbondesignsystem.com/?path=/docs/components-button--overview#button-rendericon

Application/PAL

https://research.ibm.com/

Business priority

Medium Priority = upcoming release but is not pressing

Available extra resources

No response

Code of Conduct

@github-actions
Copy link
Contributor

Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team.

If your proposal is accepted and the Carbon team has bandwidth they will take on the issue, or else request you or other volunteers from the community to work on this issue.

@jeanservaas
Copy link
Collaborator

Hi @radarfox — it seems like you're asking just to swap out caret, which the system uses, for a chevron. This is not a configuration that we'd really like to allow unless we made this change at the system level — i.e. If you feel that there's a strong case to be made for this change, I'd make the case/suggestion as a system change as it doesn't make much sense as a one-off stylistic difference. It also has no effect on the functionality of the pagination.

Also, I'd argue, that the intentional relationship between the carets for next/prev and the chevrons for dropdowns would become confused if we started swapping them out with each other in different experiences. I also feel that the carets work a bit better with the type whereas the chevrons begin to look like brackets.

image

I also have some UX questions here...why would a user in this situation want to page through 1628 pages... is this the really the best experience here? I can see a use for Next/Prev and jump to end... but jumping to middle seems odd, is that a use case that you really need? Maybe our paginiation nav is not the best situation for you here... what would be the ideal PageNav experience. Maybe the better proposal is something like a PagNav thats simplier. Like just Prev/Next and maybe First/Last. And it never shows exact pages...

image

@github-project-automation github-project-automation bot moved this from Triage to Completed in Roadmap Oct 30, 2023
@radarfox
Copy link
Author

it seems like you're asking just to swap out caret, which the system uses, for a chevron.

Yes, that's what we need. I'm not sure why would you need to make a "system level change". The icon should stay the same for other Carbon users, just Research Website would provide this special configuration option. For example the Carbon Button component allows to do this. From my developer experience, this should be also pretty easy to implement.

I will link you up with our design team, so they can explain you the reasoning and design specs behind this. I will contact you over Slack, since this will involve confidential information.

I also have some UX questions here...why would a user in this situation want to page through 1628 pages...

This is being discussed here: #15014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

2 participants