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 smaller pagination component outside of just narrow screens #17564

Open
1 task done
ghost opened this issue Sep 24, 2024 · 3 comments
Open
1 task done

Comments

@ghost
Copy link

ghost commented Sep 24, 2024

The problem

I'm working on embedding the data-table and pagination component into our product watsonx Assistant chat. The pagination component has a smaller form factor, but it only appears when the screen size is close to mobile size.
Screenshot 2024-09-23 at 3 49 13 PM

For our use case our chat width is often quite narrow so it would be nice to use the smaller form factor of the component, however there is no good way to switch to the smaller form factor when it's only enabled by using a small screen.
Screenshot 2024-09-24 at 4 11 42 PM

(I'm marking this as high priority because we do have an upcoming release - however I can get around this by using my own css to hide parts of the components just like you guys do at this more narrow breakpoint, I just don't want to rely on that solution long term since it's brittle.)

The solution

Add a prop to the pagination component that can be used to dynamically switch to the smaller form factor. The component could still operate as it does today when this prop is not set in order to not break people who are relying on the screen size breakpoint behavior. With this prop I could make the chat look like this, or if the chat window is larger I could use the original pagination component view:
Screenshot 2024-09-23 at 2 57 58 PM

Examples

I don't have examples but I'm surprised Carbon is taking this approach here. For most components it seems functionality is exposed through props or breakpoints are made based off the parent components width. Setting break points off the screensize may be unexpected by consumers of Carbon if it's not a common pattern.

Application/PAL

watsonx Assistant

Business priority

High Priority = pressing release

Available extra resources

No response

Code of Conduct

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.

@rsimpso1
Copy link

rsimpso1 commented Oct 2, 2024

This was opened by me through the wrong account. Commenting here so I will get notified about updates, and so yall have someone to reach out to if you have questions. Thanks!

@sstrubberg
Copy link
Member

We need to add a container query. This will need to be done on React and Web Components.

@sstrubberg sstrubberg moved this to 🪆 Needs Refined in Design System Nov 11, 2024
@sstrubberg sstrubberg added the planning: umbrella Umbrella issues, surfaced in Projects views label Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🪆 Needs Refined
Status: Next ➡
Development

No branches or pull requests

2 participants