-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[DataGrid] Column header design updates #14293
[DataGrid] Column header design updates #14293
Conversation
Deploy preview: https://deploy-preview-14293--material-ui-x.netlify.app/ |
'&:hover': { | ||
color: (t.vars || t).palette.text.primary, | ||
// Reset on touch devices, it doesn't add specificity | ||
// Always appear as draggable on touch devices |
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.
👍🏻
packages/x-data-grid/src/components/containers/GridRootStyles.ts
Outdated
Show resolved
Hide resolved
packages/x-data-grid/src/components/containers/GridRootStyles.ts
Outdated
Show resolved
Hide resolved
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.
Side note: Sometimes Argos diff surprises me – it doesn't pick up the separator 😅
Screen.Recording.2024-08-23.at.23.36.55.mov
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.
Also, this PR warrants a minor release.
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.
The general direction looks right 👍
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.
Nice work!
It also reminded me of a similar issue on the header filters with compact density.
Opened a separate PR for it.
fontWeight: theme.typography.fontWeightMedium, | ||
color: (theme.vars || theme).palette.primary.dark, | ||
textTransform: 'uppercase', | ||
lineHeight: 'normal', |
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'm wondering if there is a possibility some users customizing it using theme.*.*
variables. What do you think? 🤔
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'm purposefully deviating from the theme.typography.caption.lineHeight
value here because it is too large. normal
line-height should keep the spacing looking ok between the column header title and aggregation label I think.
If users want to override it, they have the class I guess?
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.
Agreed, but I'm only worried if some existing users' styles would break with this.
It's obviously not very likely but theoretically, some users may be using theme.typography.caption.lineHeight
to override this style.
It's a nitpick though. Feel free to merge it in current shape.
packages/x-data-grid/src/components/columnHeaders/GridColumnHeaderSeparator.tsx
Outdated
Show resolved
Hide resolved
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 to me!
I prefer not to include this PR in this week's release with the Material UI v6 support. Keeping other changes to a minimum would make the upgrade easier for those who need Material UI v6.
This PR includes a few small design updates to the column headers.
Preview: https://deploy-preview-14293--material-ui-x.netlify.app/x/react-data-grid/#mit-license-free-forever
1. Aggregation label type and layout updates
density="compact"
#9104 and [data grid] Improve header behavior with density property #52742. Column separator updates
1px
width, the same thickness as borders, growing to3px
on hover3. Fixed overlapping of column menu button and resize handle
24px
to10px
and repositioned the column menu buttons to avoid overlapping of the two actions.size
prop fromsmall
toinherit
.