-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[Switch] simplify structure WIP #26303
[Switch] simplify structure WIP #26303
Conversation
Details of bundle changes (experimental) @material-ui/core: parsed: +0.24% , gzip: +0.28% |
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.
It seems to go in the right direction. What should we do with the useFormControl
?
@DanielBretzigheimer What do you think the next step should be? |
Sorry, had no time this week, but I will look into it tomorrow |
d0c728a
to
3f5d400
Compare
3f5d400
to
853d63c
Compare
@oliviertassinari I have added the ripple effect and some other UI improvements today. I also applied your suggestions. The useFormControl is still on my agenda. I will look into it in the following days when I have time. |
@DanielBretzigheimer can you take a look at #26460. The PR simplify the structure of SwitchBase by replacing IconButton with ButtonBase (remove 1 level of DOM). If it is enough, we can hold this PR and improve later. |
I created this PR to address the complications from this comment. The PR isn't nearly finished, but I wanted to receive early feedback before changing too much in the code.
One thing I'm not sure about is if the SwitchBase should be removed. It clearly cleans the structure but will duplicate some code.
@oliviertassinari What do you think?
Comparison of the DOM structures:
Old
New