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

calcite-pagination does not use its available space #8369

Closed
2 of 6 tasks
MikeTschudi opened this issue Dec 7, 2023 · 14 comments
Closed
2 of 6 tasks

calcite-pagination does not use its available space #8369

MikeTschudi opened this issue Dec 7, 2023 · 14 comments
Labels
0 - new New issues that need assignment. ArcGIS Solutions Issues logged by ArcGIS Solutions team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.

Comments

@MikeTschudi
Copy link
Member

Check existing issues

Actual Behavior

calcite-pagination changes its display based on width, but it's not clear how to control this. E.g., I'd like to center the pagination component under a gallery. I specify a width for it and centering margins, but I see that the component is not filling the width that I give it. If I decrease the width, less of the pagination is shown even though there's available space:

  • width 500px: image
  • width 400px: image
  • width 300px: image
    (background color is applied to pagination component to show its width)

I've also tried using a containing div, but get the same non-filling behavior. (https://codepen.io/miketschudi/pen/GRzzwpJ?editors=100)

Expected Behavior

I expect the component to fill the available width.

Reproduction Sample

https://codepen.io/miketschudi/pen/XWOOxOZ?editors=100

Reproduction Steps

  1. Open the codepen and you'll see that the component is not filling its space because the component's background is light blue.
  2. Change the width of the component, and you may see changes in the page link display, but it will still not fill the available space.

Reproduction Version

2.0.0

Relevant Info

Windows 10 Chrome 119.0, Firefox 120.0

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

Minor impact--just UI misalignment that I'm sure to receive a bug report about. :-)

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Solutions

@MikeTschudi MikeTschudi added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Dec 7, 2023
@github-actions github-actions bot added calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive ArcGIS Solutions Issues logged by ArcGIS Solutions team members. labels Dec 7, 2023
@driskull
Copy link
Member

driskull commented Dec 7, 2023

@driskull
Copy link
Member

driskull commented Dec 7, 2023

@macandcheese do you think it would be nice for the pagination to have an alignment property or something similar?

@SkyeSeitz
Copy link

Could Pagination be centered by default? I believe left alignment would still be possible as an override if needed.
image

@SkyeSeitz
Copy link

Also @driskull could you remind me if there were key limitations with Pagination populating as many pages as it could afford in the available width verses a prescribed number of pages per breakpoint?

@MikeTschudi
Copy link
Member Author

@MikeTschudi this works: https://codepen.io/driskull/pen/qBggLNZ?editors=100

Thank you, @driskull--that works perfectly in my app!

Should the pagination fill the space given it? (I no longer need it for my app--just curious.)

@driskull
Copy link
Member

driskull commented Dec 7, 2023

could you remind me if there were key limitations with Pagination populating as many pages as it could afford in the available width verses a prescribed number of pages per breakpoint?

Not all pages are the same width so we can't do that. We would need each page to be the same width.

@driskull
Copy link
Member

driskull commented Dec 7, 2023

Could Pagination be centered by default? I believe left alignment would still be possible as an override if needed.

Could be if thats what we decide.

@driskull
Copy link
Member

driskull commented Dec 7, 2023

Should the pagination fill the space given it? (I no longer need it for my app--just curious.)

The pagination does fill the width its given, but without making each page's padding or width adjustable we can't fully fill the items within it.

@MikeTschudi
Copy link
Member Author

Since this issue has been resolved by Matt, may I close it?

Skye's proposal can be a new issue for discussion.

@driskull
Copy link
Member

@SkyeSeitz @macandcheese would like your thoughts on this one.

If we should have a property for alignment or not.

The only other way to not have alignment not matter is if we stretch something within each page (width/padding/spacing/etc) to make it fill the space.

@macandcheese
Copy link
Contributor

It seems like we are leaning that way based on the current state - where the pagination container fills the width but does not fill that width with additional pages. So in this context, alignment property makes sense to me.

I do think making the component automatically adjust - displaying as many "pages" as possible within a container size - would be nice, but out of scope for now.

@driskull
Copy link
Member

I do think making the component automatically adjust - displaying as many "pages" as possible within a container size - would be nice, but out of scope for now.

I originally had this in the responsive PR but design wanted each page's padding to be consistent.

@driskull
Copy link
Member

Closing issue. @SkyeSeitz feel free to open a new one for any ui enhancements.

@SkyeSeitz
Copy link

Awesome - Thanks, @driskull. Opened an issue for the discussed behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Solutions Issues logged by ArcGIS Solutions team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

4 participants