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

[Switch] Simplify source #38910

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Conversation

oliviertassinari
Copy link
Member

Implement https://github.com/mui/material-ui/pull/38570/files#r1299412334. The goal is to simplify the mental model, trying to have hooks feed in from all the props as often as possible.

I had a quick look at two libraries that have a similar hook + component pattern to see how they handle it, out of curiosity:

@oliviertassinari oliviertassinari added component: switch This is the name of the generic UI component, not the React module! core Infrastructure work going on behind the scenes labels Sep 10, 2023
@mui-bot
Copy link

mui-bot commented Sep 10, 2023

Netlify deploy preview

https://deploy-preview-38910--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 810dafe

@michaldudak michaldudak added package: base-ui Specific to @mui/base package: joy-ui Specific to @mui/joy labels Sep 11, 2023
Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

Looks sensible 👍

@oliviertassinari oliviertassinari merged commit 90585d4 into mui:master Sep 11, 2023
22 checks passed
@oliviertassinari oliviertassinari deleted the switch-simplify branch September 11, 2023 14:46
anon-phantom pushed a commit to anon-phantom/material-ui that referenced this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: switch This is the name of the generic UI component, not the React module! core Infrastructure work going on behind the scenes package: base-ui Specific to @mui/base package: joy-ui Specific to @mui/joy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants