-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pagination algorithm enhancements (#5504)
* Simplify Pagination algorithm with an early return * Pagination: Keep a consistent width on next and previous * Simplify Pagination algorithm and keep number of pages shown consistent * Add changeset * Replicate style changes to Pagination.module.css * wip: algo refactor Co-authored-by: Hector Garcia <[email protected]> * refactor(Pagination): refine algorithm * fix: lint * pagination: small tweaks * fix(Pagination): refine logic, add tests * chore: remove outdated comments * test(vrt): update snapshots * test(vrt): update snapshots * chore(Pagination): refactoor Co-authored-by: Hector Garcia <[email protected]> * fix(Pagination): remove unused type --------- Co-authored-by: Marie Lucca <[email protected]> Co-authored-by: Hector Garcia <[email protected]> Co-authored-by: Marie Lucca <[email protected]> Co-authored-by: francinelucca <[email protected]>
- Loading branch information
1 parent
49bf6f1
commit 9986d67
Showing
23 changed files
with
325 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@primer/react": patch | ||
--- | ||
|
||
Pagination: Optimize the page rendering algorithm and prevent layout shifts. |
Binary file modified
BIN
+185 Bytes
(100%)
...ponents/Pagination.test.ts-snapshots/Pagehead-Default-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+173 Bytes
(100%)
.../components/Pagination.test.ts-snapshots/Pagehead-Default-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+176 Bytes
(100%)
...ents/Pagination.test.ts-snapshots/Pagehead-Default-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+185 Bytes
(100%)
...apshots/components/Pagination.test.ts-snapshots/Pagehead-Default-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+185 Bytes
(100%)
...ponents/Pagination.test.ts-snapshots/Pagehead-Default-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+184 Bytes
(100%)
...onents/Pagination.test.ts-snapshots/Pagehead-Default-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+178 Bytes
(100%)
...nts/Pagination.test.ts-snapshots/Pagehead-Default-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+184 Bytes
(100%)
...pshots/components/Pagination.test.ts-snapshots/Pagehead-Default-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+184 Bytes
(100%)
...onents/Pagination.test.ts-snapshots/Pagehead-Default-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+185 Bytes
(100%)
...nts/Pagination.test.ts-snapshots/Pagehead-Dev-Default-dark-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+173 Bytes
(100%)
...ponents/Pagination.test.ts-snapshots/Pagehead-Dev-Default-dark-dimmed-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+176 Bytes
(100%)
.../Pagination.test.ts-snapshots/Pagehead-Dev-Default-dark-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+185 Bytes
(100%)
...ots/components/Pagination.test.ts-snapshots/Pagehead-Dev-Default-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+185 Bytes
(100%)
...nts/Pagination.test.ts-snapshots/Pagehead-Dev-Default-dark-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+184 Bytes
(100%)
...ts/Pagination.test.ts-snapshots/Pagehead-Dev-Default-light-colorblind-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+178 Bytes
(100%)
...Pagination.test.ts-snapshots/Pagehead-Dev-Default-light-high-contrast-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+184 Bytes
(100%)
...ts/components/Pagination.test.ts-snapshots/Pagehead-Dev-Default-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+184 Bytes
(100%)
...ts/Pagination.test.ts-snapshots/Pagehead-Dev-Default-light-tritanopia-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.