Skip to content

Fix issue with tips for truncated text when switching pages in a table #6682

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

Merged
merged 6 commits into from
May 25, 2023

Conversation

vbanda28
Copy link
Contributor

What does this PR do?

Resolve issue described here with truncated text: #6659. The issue occurs because tips for truncated text are not being updated when switching pages in a table. Resolved by dispatching an event "paginationupdate" in pagination.js when page is changed and adding an event listener in Text.js to call updateTip.

Where should the reviewer start?

Start with file pagination.js

What testing has been done on this PR?

Tested manually and ran test suite.

How should this be manually tested?

We can use the storybook component Visualization -> DataTable -> Pagination for testing. The data in pagination.tsx can be updated with truncated text. The pagination.tsx file with local changes I made for testing can be found here: https://gist.github.com/vbanda28/84db2a7872a4183a0ee9dce031c96164

Do Jest tests follow these best practices?

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

Any background context you want to provide?

What are the relevant issues?

#6659

Screenshots (if appropriate)

Do the grommet docs need to be updated?

No

Should this PR be mentioned in the release notes?

Yes

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

Backwards compatible

@jcfilben jcfilben added the PRty Biweekly PR reviews by grommet team with hoping of closing such PRs label Mar 29, 2023
@taysea taysea self-assigned this Mar 30, 2023
@jcfilben jcfilben requested review from jcfilben and removed request for jcfilben March 30, 2023 18:05
@halocline halocline self-requested a review March 30, 2023 18:07
Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

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

Functionality looks great, just one small naming comment.

@halocline halocline removed their request for review March 30, 2023 18:15
@jcfilben jcfilben added waiting Awaiting response to latest comments and removed PRty Biweekly PR reviews by grommet team with hoping of closing such PRs labels Apr 6, 2023
@jcfilben jcfilben removed the waiting Awaiting response to latest comments label May 22, 2023
@jcfilben jcfilben requested a review from taysea May 22, 2023 21:30
Copy link
Collaborator

@taysea taysea left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the contribution!

@taysea taysea requested a review from jcfilben May 25, 2023 15:36
@jcfilben jcfilben added the PRty Biweekly PR reviews by grommet team with hoping of closing such PRs label May 25, 2023
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PRty Biweekly PR reviews by grommet team with hoping of closing such PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants