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

Fix for visual rowDetails in DataTable #6569

Closed

Conversation

aheintz
Copy link

@aheintz aheintz commented Jan 6, 2023

What does this PR do?

  1. Added a justify="center" to the ExpanderControl component to make the icon vertically centered and to handle non-standard themes or styling.
  2. Fixed a rendering problem where the first line of the Datatable was selected if using Cmd-Tab to move back to the browser window and triggering an event in use-keyboard.js which caused this effect. Removed the "usingKeyboard", the only case I could find where this would be applicable would be using the onSelect use-case, but that still works as intended after manual testing. I would appreciate some input whether which is correct though.

Where should the reviewer start?

src/components/DataTable/ExpanderCell.js and src/components/DataTable/Body.js are the only files changed except the updated snapshot.

What testing has been done on this PR?

  1. Manual testing with different themes to verify the icon's position. The snapshot changes also indicate that the only affected are vertical (flexbox) alignment.
  2. Manual tests of the removal of the usingKeyboard, I might need help here to verify it's not affecting something I'm not aware of, I'm not too familiar with grommet.

How should this be manually tested?

The storybooks should suffice.

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?

This partially resolved #6344

Screenshots (if appropriate)

Do the grommet docs need to be updated?

No

Should this PR be mentioned in the release notes?

No

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

Backwards compatible

…ertically centered and to handle non-standard themes or styling.

Removed the "usingKeyboard", it conflicted with switching apps (at least on mac) using Cmd-Tab and rendered the top row focused/active independent on which rows was expanded. The only case I could find where this would be applicable would be using the "onSelect" use-case, but that still works as intended after manual testing. I would appreciate some input whether which is correct though.
@aheintz aheintz closed this Jan 7, 2023
@aheintz
Copy link
Author

aheintz commented Jan 7, 2023

Sorry, had a bit of a git issue. Closing this and reopening.

@aheintz aheintz deleted the row-expansion-visual-problems branch January 7, 2023 10:45
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.

Datatable rowDetails poor component interaction and visual bugs
1 participant