Closed rylew1 closed 1 month ago
cc @andycochran if you have a moment can you take a peek at this?
Brainstorming options: https://betagrantsgov.slack.com/archives/C05TGEL3C6Q/p1715213399388129
Reintroduce totalPages
Go up to MAX_SLOTS
of 7
Stretch:
theme-pagination-font-family
in css settings (override in _uswds_theme.scss
)here's an example:
.usa-component {
font-family: family('ui');
font-size: size('ui', $theme-body-font-size);
line-height: line-height('ui', $theme-body-line-height);
}
Summary
When we removed the
totalPages
prop from being passed intoSearchPagination
in order to make the component "unbounded" - I believe this impacts the number of pages shown in theSearchPagination
component when the results are less then the number ofMAX_SLOTS
(set to 5)For example -
On initial load - there's full set of results and 5 pagination "slots" - (page 1, page 2, page 3, an ellipses, and a next button):![image](https://github.com/HHS/simpler-grants-gov/assets/93001277/f7188cdf-343a-4065-9e13-466c7a38b9c9)
When you filter the results just down to 3 results - there's still 5 pagination "slots" - but nothing actually on anything other than the 1st page:
So we do need to manually calculate a
totalPages
if the number of pages is less than 3 I believe.Acceptance criteria