mui-x icon indicating copy to clipboard operation
mui-x copied to clipboard

[DataGrid] Column header design updates

Open kenanyusuf opened this issue 1 year ago • 1 comments

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

  • The layout of the column header title and aggregation label have been updated so that the two are vertically centered together, rather than the label floating underneath.
  • See https://github.com/mui/mui-x/pull/13950 for more specific details on the type changes.
  • Fixes https://github.com/mui/mui-x/issues/5530 and https://github.com/mui/mui-x/issues/9104
Before After
localhost_3001_playground_ (3) localhost_3001_playground_ (2)

2. Column separator updates

  • Separator visibility logic has been updated to:
    • Always be visible by default, not just on hover of column headers
    • Hidden when a cell is focused or bordered until the edge is hovered
  • New separator icon that in its default state is 1px width, the same thickness as borders, growing to 3px on hover
  • Updated separator icon hover/resize color from black to primary
  • Fixes https://github.com/mui/mui-x/issues/7268
Before After
localhost_3001_playground_ (3) localhost_3001_playground_
localhost_3001_playground_ (5) localhost_3001_playground_ (1)
localhost_3001_playground_ (2) localhost_3001_playground_ (4)

3. Fixed overlapping of column menu button and resize handle

  • Reduced the resize handle hit area from 24px to 10px and repositioned the column menu buttons to avoid overlapping of the two actions.
  • Also made column menu icon size consistent with the sort icon by switching the size prop from small to inherit.
Before After
Screenshot 2024-08-22 at 15 35 38 Screenshot 2024-08-22 at 15 41 54

kenanyusuf avatar Aug 22 '24 09:08 kenanyusuf

Deploy preview: https://deploy-preview-14293--material-ui-x.netlify.app/

Generated by :no_entry_sign: dangerJS against 8051e7ca5d430872fa4a18790503d8ae664a1e32

mui-bot avatar Aug 22 '24 10:08 mui-bot

#5274, #9162, #9776 might be related to this PR.

oliviertassinari avatar Sep 01 '24 17:09 oliviertassinari