-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[material-next][Switch] Add Switch
component
#39886
Comments
@DiegoAndai I worked on the next steps and came to the point where I asked myself whether we wanted to keep the current structure of the switch component or align it with the structure of @mui/base. So there are two options:
<Root>
<SwitchBase/> //has to be copied in @mui/mui-material-next
<Track/>
</Root>
<Root>
<Track/>
<Thumb/>
<Input/>
</Root> I would prefer the second option, as it is easier to implement the useSwitch hook, but there would be a lot of breaking changes. However, I find this justifiable, as the structure of the components in |
I would also prefer option 2. What are the breaking changes that would be required? |
I think that must have been all of them. If nothing speaks against it, I would try to implement the whole thing and we can then make further adjustments in the PR. |
I'm not so worried about these ones, the whole idea of the Base UI refactor is to remove code duplication, so removing
This one makes sense as well, we'll soon deprecate these in favor of the slots pattern
Is there a use for this prop? I wouldn't remove it unless there's an advantage of doing so or if it's difficult to keep for some reason.
Let's do that 🚀 let me know if there's anything I can help you with. Let's try to keep breaking changes to a minimum besides the ones listed above. If you find any improvements/fixes on the Base UI side, let us know so we can discuss 🙌🏼. |
@DiegoAndai I didn't quite understand myself what the |
@lhilgert9, the |
Should we add the "on hold" label to all the MD3 issues? I can't think of a supporting reason to work on those until the MUI System and Base UI are finalized. What I see is that it would slow us to get Material UI v6 out of the door, while also taking a significant risk for needed to redo the effort, there is a good chunk of uncertainties:
|
It's "on hold" regarding the Core team. Do you think we should also hold on community contributors for it? I see benefits in having the community continue the effort:
What do you think? cc @mnajdova to get your opinion on it as well |
I agree internally, that we should not work on the migration for now. For external contributions, I would leave that up to @DiegoAndai. My feeling is that we should not receive contributions. Few reasons why:
|
@mnajdova, fair points. I'm marking the MD3 issues as "on hold" for now. @lhilgert9 I hope this doesn't discourage you from contributing to other Material UI issues. You've been making significant contributions. We will need help with v6 soon, and in the second half of the year, we will resume the MD3 work 😊. |
@DiegoAndai Sounds understandable to me. I'll see if I can contribute to V6. I will do my best. I'm looking forward to learning and developing new things |
I replied on the ButtonGroup PR 🙌🏼 |
This issue is to track the work for adding the
Switch
component to @mui/material-next, moving forward the Material You effort (#29345)Material You Swicth specification: https://m3.material.io/components/switch/overview
Migration Guide steps
Switch
to material next #39887Remove deprecated components and componentsProps props:Skipped, no props to removeuseSwitch
&useSlotProps
: [material-next][Switch] Apply MD3 style and use Base UI hooks #40442Note: This comment will be updated to show the progress and list possible issues.
@DiegoAndai
The text was updated successfully, but these errors were encountered: