-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
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.userEvent
is used in place offireEvent
.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