-
-
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-ui] Deprecate *Component
and *Props
props
#41281
Comments
@DiegoAndai Hi man, hope all is well! Can you mark speed dial as under way 40698. I'll be adding to it over the coming weeks 🤟 |
@harry-whorlow done 🙌🏼 |
Utils for the codemods of these deprecations were added in #41685. This makes implementing the codemods easier. |
@DiegoAndai I think I'll take up menu next, I'll create a pull request in the coming days. 🤟 |
My draft for menu, if you could mark menu as 'in progress' that would be awesome. 🤟 |
Hey everyone! With the core team, we've been discussing that composition might be a better API than slots for these props' use cases. It hasn't been decided yet if we will take this approach, but until we have more clarity, I'm marking this issue as on hold. For v6, we should revert the deprecation messages we've added. Is someone here interested in opening a PR for that? It should only revert the deprecation messages, not the code itself. Note that #41279 is not on hold. We will continue with that one, as having two names for the same thing ( I'm sorry if you had open PRs and this disappoints you 😓 but we should strive for the best API 🙌🏼 🚀. For the moment, let's close open PRs. I'll keep you updated. |
@DiegoAndai I could do this. |
@DiegoAndai greetings! I see there are more tickets being linked to this one lately. Perhaps this current issue has been given any more thoughts from the core team and there is some decision now (together with #37585) ? |
@siriwatknp given @oliviertassinari's performance concerns, I added a task to this issue to measure |
Based on the benchmark (in ms) using CardHeader comparison between 6.3.0 vs 6.4.0 (using For CardHeader, the Below is the details of the benchmark: row: number of instances
Benchmark is done on Apple M3 Pro I'd say this is acceptable for v7. What's your thought @DiegoAndai cc @mnajdova |
@siriwatknp a couple more things I think we should try:
|
@DiegoAndai Yes, I'm benchmarking some more components. |
@DiegoAndai I was wrong. The performance difference of the previous benchmark comes from the IconButton, not the CardHeader. In the previous benchmark, I use this markup: <CardHeader
key={i}
avatar={<Avatar aria-label="recipe">R</Avatar>}
action={
<IconButton aria-label="settings">
<MoreVertIcon />
</IconButton>
}
title="Shrimp and Chorizo Paella"
subheader="September 14, 2016"
/> After I replace Avatar and IconButton with div and button, the performance has no difference between 6.3.0 and 6.4.0.
As you can see, I split them into 3 scenarios:
CardHeader has 6 slots and there is no difference in performance. I think the migration is safe to do. More details on the IconButton, in v6.4.0 the |
@DiegoAndai if this task is moving again, can my #42218 be reopened? [edit] ah, I see its already been done in #44913, if its cool with you guys I'll pick up snack bar then |
@harry-whorlow please go ahead. Let us know when you open a PR. cc: @siriwatknp |
@siriwatknp just a heads up: I added a task to check before closing this issue: |
Part of #40417
Description
Deprecate
*Component
and*Props
props in v6, planned for removal in v7.slots
andslotProps
slots
orslotProps
props do not exist:Example PR
Contributing
Feel free to take any components that still need to be done or in progress. Please mention this issue in your PR so we can link it in the description and keep it up to date.
Components to migrate
ordered by page views
ButtonBaseSelect@siriwatknp (the current implementation does not allow to passslots, slotProps
to theSelectInput
)NativeSelect@siriwatknp (the current implementation does not allow to passslots, slotProps
to theSelectInput
)slots
andslotProps
. #44570 @siriwatknp*TypographyProps
and completeslots
,slotProps
#44729slots
andslotProps
#44971slots
,slotProps
#45035inputProps
and complete slots, slotProps #45076slots
,slotProps
#45012slots
,slotProps
#44960slots
,slotProps
#44960LinearProgressProps
and completeslots
,slotProps
#45033slots
,slotProps
#44913Additional tasks
useSlot
's impact on component performance - @siriwatknpSummary: no different, see the benchmark details
*Component
and*Props
internally, for example: https://github.com/mui/material-ui/blob/master/packages/mui-material/src/Autocomplete/Autocomplete.js#L688Search keywords: deprecation material-ui
The text was updated successfully, but these errors were encountered: