-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
DataViews: make items per page an even number #55906
Conversation
Size Change: +536 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
Flaky tests detected in 2d09d90. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6774069825
|
I'd love more thoughts but personally I'd remove 5 or 6, I'd make 20 the default and maybe add 100 |
I also think eventually we'll need to have a bigger number like 20. I started with 5 just for easier testing of pagination when we implement features. |
Implemented this. I am not really opinionated about which numbers to show, as long as they work well with all the layouts we have (5 is not). Note that I initially suggested a number below 10 or 20 because they introduce scrolling. I asked about that at #55905 because it is a bit weird (pagination controls not in the viewport, filters not visible if scrolling down, etc.). |
What?
Having 5 items as the minimum items per page doesn't work well with the grid view.
In a scenario with more than 5 items we end up with the following (note how the 6th space in the grid is empty, inducing to believe there is no more records, yet the pagination says otherwise):
Why?
To bring clarity to the grid view.
How?
By setting the minimum to 20, see conversation #55906 (comment)
By setting the minimum to 6. I've also tested with 10 as minimum, but that forces scrolling, which has its own issues #55905 I'm not really opinionated on the specific number, though.