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

[pickers] Improve `PickersLayout` styles consistency

Open noraleonte opened this issue 1 year ago • 1 comments

I noticed a few styling inconsistencies that were causing issues for customization.

  1. the actionBar and shortcuts could not be customized with styleOverrides
  2. applying some of the toolbar, actionBar and shortcuts styles in the PickersLayoutRoot by targeting classes was causing some specificity issues => you could only override the grid structure by overriding the PickersLayoutRoot styled entirely.

noraleonte avatar Oct 17 '24 11:10 noraleonte

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

Generated by :no_entry_sign: dangerJS against 019107ccbb66e2f39243f1ac755489b480f2ea4c

mui-bot avatar Oct 17 '24 11:10 mui-bot

@noraleonte @flaviendelangle There's another visual inconsistency (divider above actionbar) when using actionBar for <DatePicker/>/<DateRangePicker /> compared to <DateTimePicker/>/<DateTimeRangePicker/>

<DatePicker/> image

<DateTimePicker/> image

See the <Divider/> in question here: https://github.com/mui/mui-x/blob/master/packages/x-date-pickers/src/DesktopDateTimePicker/DesktopDateTimePickerLayout.tsx#L53

It's also conditionalised in a way so that if you provider your own <ActionBar/> component via slots, the divider isn't necessarily shown.

oscar-b avatar Nov 14 '24 09:11 oscar-b

This pull request has conflicts, please resolve those before we can evaluate the pull request.

github-actions[bot] avatar Dec 04 '24 10:12 github-actions[bot]

@noraleonte was the fixes merged somewhere else, or abandoned? Should I open a separate issue for the divider inconsistency above?

oscar-b avatar Dec 10 '24 10:12 oscar-b

Hey @oscar-b 👋 The fix for the fact that the actionBar and shortcuts could not be customized with styleOverrides was fixed in a different PR. The inconsistency with the divider seems like a separate issue. I think you could open a new issue with a reproduction case, it would be the best 👌 Feel free to reference your comment from this PR 👍 Thanks!

noraleonte avatar Dec 11 '24 14:12 noraleonte