Skip to content
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

Pagination display fix. @cagov/ds-pagination version 2.0.4 #1028

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

jbum
Copy link
Contributor

@jbum jbum commented Aug 15, 2024

This fixes a display issue with pagination buttons. The current code displays the following when there are 4 available pages.

CleanShot 2024-08-15 at 14 01 36

Notice that on page 1, Page 3 is mysteriously dropped. On Page 4, an ellipsis is displayed in place of a single page (ellipsis should only be used for 2 or more pages).

There are similar issues with 5 page, 6 page, and 7 page displays. Here is a 7 page display.
CleanShot 2024-08-15 at 14 02 58
Notice that an ellipsis is shown in place of a single page, and page 6 is missing.

This patch shows the ellipsis in cases where it represents 2 or more pages, and shows a single page in its place, when it is appropriate to do, fixing all the above issues.

Copy link

Preview site available at jbum-pagination-patch.pr.designsystem.webstandards.ca.gov.

@zakiya
Copy link
Collaborator

zakiya commented Aug 19, 2024

@jon-grant-state-ca-gov @kkoryaka Can you review/comment/test/merge? We have some site updates that depend on it

Copy link
Collaborator

@jon-grant-state-ca-gov jon-grant-state-ca-gov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that missing page numbers are no longer an issue; ellipsis appears when expected, and no other issues found by me.

Looks good!

Copy link
Collaborator

@kkoryaka kkoryaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pagination improvements. maybe fix version number in changelog to 2.0.4 also Screenshot 2024-08-20 at 11 02 12 AM

@zakiya
Copy link
Collaborator

zakiya commented Aug 20, 2024

Just realized our contribution documentation is in a private Coda. Going to add them to this project's wiki. CDT folks you can determine what you want to do with them

@zakiya
Copy link
Collaborator

zakiya commented Aug 20, 2024

@jbum jbum merged commit 703b288 into main Aug 21, 2024
2 checks passed
@jbum jbum deleted the jbum-pagination-patch branch August 21, 2024 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants