-
Notifications
You must be signed in to change notification settings - Fork 842
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
[EuiDataGrid] Redesign grid header #7371
Merged
cee-chen
merged 16 commits into
elastic:datagrid-redesigns
from
jughosta:7137-grid-header-updates
Nov 21, 2023
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c0afbe0
Update grid header styles
jughosta 02f5e13
Update snapshots
jughosta 718bfea
Fix styles
jughosta 70ad0aa
Show the icon only on hover
jughosta cc321d6
Extend tests
jughosta d6baabe
Add changelog
jughosta 73ad361
Update animations
jughosta 53509b8
Update snapshots
jughosta ff1cbe1
Fix styles
jughosta 9759255
Update class names
jughosta 7d041bf
Merge branch 'datagrid-redesigns' into 7137-grid-header-updates
cee-chen 596e717
[CSS cleanup] Remove need for extra flex wrapper
cee-chen 003db25
Fix right schemas/columns
cee-chen 5a4b315
Fix non-centered boxes icon
cee-chen afc7fb1
Remove unnecessary extra className
cee-chen 08c9a47
Copy tweaks
cee-chen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- Updated `EuiDataGrid` column header cells to show the sort arrow after the heading text, instead of before | ||
- Updated `EuiDataGrid`'s column header actions icon from a chevron to `boxesVertical` | ||
|
||
**Bug fixes** | ||
|
||
- Fixed `EuiDataGrid`'s numeric and currency column heading cells to be correctly right-aligned |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@andreadelrio Can I just check in with you super quick - now that cell actions no longer have the "slide in from the right" behavior (#7343), do we want this icon to still have it? Or do we want to opt for the boxes icon to always be visible?
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.
I believe @MichaelMarcialis was behind this suggestion. Michael, can we have your input here? From my perspective, I like that the boxes icon appears on hover. However, I do find it a bit odd that when the columns are aligned right, the appearance of the boxes icon causes a shift in the column heading. Because of this, I would suggest we consider either having the boxes icon always visible or overlay it on top of the heading on hover, that way we no longer have a shift in the heading's text.
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.
@MichaelMarcialis chatted about this in sync this morning and agreed it feels a little odd, but not super odd, so we're going to move ahead with this as-is for now, with the asterisk that we may come back and revisit this once the schema tokens have been added.
(Michael, feel free to give a more complete/accurate summary of your thoughts - I'm sorta rushing to merge this in, apologies!!)
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.
For a bit of background, my original suggestion originates from the Discover design refresh that @andreadelrio and I collaborated on. With our suggestion to prepend field type tokens to the column headers, we thought that only showing the
boxesVertical
icon when the user is hovering/focusing that column heading helped to cut down on the visual noise and reveal that additional actions could be taken when the user is in a position to use them. For those reasons, I still prefer the idea of hiding theboxesVertical
icon until the user hovers/focuses the column headings. As for the right-aligned text shifting, personally I don't mind it with the animation/transition that @jughosta has in place. I think it does a good job of softening its appearance. However, if I'm in the minority here, I'm happy to discuss further.That said, @cee-chen recently implemented a newly suggested approach to revealing action buttons when hovering/focusing data grid body cells, as mentioned above. Our approach with the column headings here is technically inconsistent with that new cell body approach. But then again, the data grid column headings have always functioned and appeared differently than the body cells, so perhaps it's a non-issue.
TL;DR: My personal suggestion would be to keep it as @jughosta has here, with the potential future caveat that we may at some point in the future want the action button for data grid column headers to be given the same treatment as body cells. Thoughts?