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

Ensure PaginationSummary reflects active page #7169

Merged
merged 4 commits into from Mar 21, 2024

Conversation

taysea
Copy link
Collaborator

@taysea taysea commented Mar 20, 2024

What does this PR do?

PaginationSummary should always reflect active page. When used outside of Data, the summary wasn't updating when page changed via pagination controls.

Also removed extra space in PaginationStep and updated SpaceX story to demo latest summary support.

Where should the reviewer start?

src/js/components/Pagination/Pagination.js

What testing has been done on this PR?

Local.

How should this be manually tested?

On "Steps" story, change page and PaginationSummary should update.

Do Jest tests follow these best practices?

  • screen is used for querying.
  • The correct query is used. (Refer to this list of queries)
  • asFragment() is used for snapshot testing.

Any background context you want to provide?

What are the relevant issues?

Screenshots (if appropriate)

Do the grommet docs need to be updated?

Should this PR be mentioned in the release notes?

Is this change backwards compatible or is it a breaking change?

Backwards compatible.

jcfilben
jcfilben previously approved these changes Mar 20, 2024
Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

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

Looks good!

@jcfilben jcfilben dismissed their stale review March 20, 2024 17:31

We should add a jest test

Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

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

Code looks good, can we add a jest test for this?

@taysea
Copy link
Collaborator Author

taysea commented Mar 20, 2024

Code looks good, can we add a jest test for this?

Done! And fixed some deprecated assertions as well.

@taysea taysea requested a review from jcfilben March 20, 2024 18:15
Copy link
Collaborator

@jcfilben jcfilben left a comment

Choose a reason for hiding this comment

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

Thank you!

@taysea taysea merged commit d58cab9 into master Mar 21, 2024
13 checks passed
@taysea taysea deleted the fix/pagination-summary-activepage branch March 21, 2024 16:10
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.

None yet

3 participants