feat: add compact variant to pagination - #4696
Conversation
ba22175 to
ba4ed76
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4696 +/- ##
=======================================
Coverage 97.63% 97.63%
=======================================
Files 957 957
Lines 31100 31114 +14
Branches 11435 11443 +8
=======================================
+ Hits 30364 30378 +14
Misses 729 729
Partials 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
a114090 to
6755fe5
Compare
a8e09f8 to
0d40095
Compare
0d40095 to
929bec5
Compare
929bec5 to
96f8597
Compare
96f8597 to
21e7a73
Compare
0dd5cae to
5212fbe
Compare
| return { wrapper, rerender }; | ||
| } | ||
|
|
||
| function renderWithI18n(jsx: React.ReactElement) { |
There was a problem hiding this comment.
There's a TestI18nProvider helper specifically for testing the logic independent of the strings themselves (src/i18n/testing.tsx)
There was a problem hiding this comment.
Thanks, used the TestI18nProvider
There was a problem hiding this comment.
Not sure why these tags (inside the I18nStrings interface) were here before, they technically do nothing here (except confuse people using IDE suggestions).
There was a problem hiding this comment.
I have cleaned it up. I have removed the other comments as well.
Co-authored-by: Avinash Dwarapu <dwaraa@amazon.com>
fd24e5a to
6585baf
Compare
d83fb26 to
0387277
Compare
Description
Adds a compact Pagination variant via
pagesVariant="compact", which shows a single3 of 12counter between the arrows instead of numbered page buttons, for space-constrained layouts. The text is localized throughi18nStrings.pagesCompactText(receiving{ currentPage, pagesCount, openEnd });openEndappends a+.pagesVariantdefaults to'normal', so existing usage is unchanged.Related links, issue #, if available: fUKQXLDPlRFb
How has this been tested?
Unit tests, and visual on test pages, and added to visual regression test as well.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.