[Rating] Remove deprecated IconContainerComponent#48019
[Rating] Remove deprecated IconContainerComponent#48019mj12albert merged 6 commits intomui:masterfrom
Conversation
Netlify deploy previewBundle size report
|
| getLabelText = defaultLabelText, | ||
| highlightSelectedOnly = false, | ||
| icon = defaultIcon, | ||
| IconContainerComponent = IconContainer, |
There was a problem hiding this comment.
The IconContainer previously stripped the value, removing the component leaks it into the DOM (e.g. in the first demo
<label><span value="2" class="MuiRating-icon"><svg /></span><span class="MuiRating-visuallyHidden">2 Stars</span></label>We probably need to remove the value here now
There was a problem hiding this comment.
I almost feel like it's a different slot - iconContainer that receives the value and maybe the icon and renders it.
There was a problem hiding this comment.
fixed, new test added to ensure the behavior
Use internalForwardedProps with IconContainer to strip value from DOM spread. Add test to verify.
…-rating-props # Conflicts: # docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md
Ideally, yes but I would NOT change it right now. It's the old name before
In this case using
|
We're talking about i.e. the (the PR looks good to me, was just confused by this for a sec) |
Yes, correct (updated to |
|
@mnajdova Is the explanation clear to you? anything I missed. |
…-rating-props # Conflicts: # docs/data/material/migration/upgrade-to-v9/upgrade-to-v9.md
Summary
Remove the deprecated
IconContainerComponentprop from the Rating component.Breaking change
The
IconContainerComponentprop has been removed. UseslotProps.icon.componentinstead:Use the rating-props codemod for automated migration:
Changes
IconContainerComponentfrom component source, types, and PropTypesRadioGroupRatingdemo to useslotProps.icon.componentpnpm proptypes && pnpm docs:apiTest plan
pnpm prettierpassespnpm eslintpassespnpm typescriptpassespnpm test:unit Ratingpasses (49 tests)