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

[pickers] Add overrides to PickersArrowSwitcher #4672

Merged
merged 1 commit into from
Apr 29, 2022

Conversation

m4theushw
Copy link
Member

@m4theushw m4theushw commented Apr 27, 2022

Preview: https://deploy-preview-4672--material-ui-x.netlify.app/x/react-date-pickers/date-picker/

An example for #4669

My goal was to only restore the capability to provide overrides via the theme and add meaningful class names. I didn't add the classes prop.

Some components have "private" class names. Do you agree to make them public? In the DataGrid every new class is public.

const classes = generateUtilityClasses('PrivatePickersSlideTransition', [

Before:

image

After:

image

@mui-bot
Copy link

mui-bot commented Apr 27, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 258.5 595.9 498.6 444.34 147.424
Sort 100k rows ms 473.9 927.9 639.5 679.48 149.619
Select 100k rows ms 109 245.8 137.8 158.64 48.301
Deselect 100k rows ms 99.2 209.1 178.4 155.88 37.255

Generated by 🚫 dangerJS against 474cba5

@m4theushw m4theushw added component: pickers This is the name of the generic UI component, not the React module! new feature New feature or request labels Apr 27, 2022
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes seem to match with what we do on the rest of the codebase, especially in Material UI.

Some components have "private" class names. Do you agree to make them public? In the DataGrid every new class is public.

Usually, developers ask to be able to customize everything. I think that the only cases when a class name should stay private is if we don't envison a way to use it for customization, or if either is a better way to achieve the same customization.

@flaviendelangle
Copy link
Member

Usually, developers ask to be able to customize everything. I think that the only cases when a class name should stay private is if we don't envison a way to use it for customization, or if either is a better way to achieve the same customization.

Or if we want to be able to change them before the next major
I never saw it happen though

@m4theushw
Copy link
Member Author

m4theushw commented Apr 27, 2022

I would say to keep only classes of the XXXTransition components as private, but even these the users might want to customize. For instance, if I want to override the animation duration or easing only with CSS is possible. It seems that the path is to make every class public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants