Follow-up from "feat: Custom pagination component based on design system"
Description
Discuss limits and predefined maximum sizes for pagination
The following discussion from !259 (merged) should be addressed:
-
@mikegreiling started a discussion: (+4 comments) This may be something for a follow-up issue, but I find the behavior of the
limits
property a little odd.For instance, it appears that the limit would allow all 10 page options to appear in this example. If so, why hide any behind an ellipsis at all? If we have the space for it, shouldn't we show all of them all the time?
I think instead of dividing the limit in half and setting that as a maximum for the left-side adjacent pages and the right-side adjacent pages, we should take any space unused by the left and give it to the right, or vice versa. If we're at "page = count - 2" with a limit of 9, we should show 2 links on the right, and 6 on the left.
This would have the effect of keeping the pagination element more or less a consistent size rather than it expanding and contracting as you reach the upper and lower limits.