material-ui
material-ui copied to clipboard
[material-ui][Select] Apply missing root class
Docs says .MuiSelect-root is applied to root component but it's not applied to any element (check useEffect code in before sandbox to verify this) . This PR adds root class to root component
Before: https://stackblitz.com/edit/react-mxoqrt?file=Demo.tsx
After: https://codesandbox.io/s/quirky-wind-zpyc6c?file=/src/Demo.tsx
- [x] I have followed (at least) the PR section of the contributing guide.
Netlify deploy preview
https://deploy-preview-42975--material-ui.netlify.app/
Bundle size report
Details of bundle changes (Toolpad) Details of bundle changes
Generated by :no_entry_sign: dangerJS against addf182fa15fa267a1063e4110d934f3a58f16e0
@sai6855, may I ask you to review when that code in line 87 was added and if it ever worked?
Line 87 was added by me 😑 in this PR #38424, and PR didn't have any test that tests presence of root class on root element.
If remember correctly, my reasoning for not adding test was, i thought following test would be good enough. Turs out it's not.
Reason this test passed is, root was manually added on line 225 and presence of root class was tested on line 234. If line 225 was removed, line 234 test wouldn't have passed
https://github.com/mui/material-ui/blob/6bb06b9ada2fe0e7d8d6ee0f05ceae3ddb2c3464/packages-internal/test-utils/src/describeConformance.tsx#L214-L236
@sai6855 @DiegoAndai is this PR still relevant?
This is still relevant, and reviewing again I think this is the correct solution. Sorry for blocking it before. @sai6855 may I ask you to update the PR?
@sai6855 to fix the argos build, lets close this PR and open a new one with the same changes.
lets close this PR and open a new one with the same changes.
opened new PR here https://github.com/mui/material-ui/pull/44928
Closing as duplicate of https://github.com/mui/material-ui/pull/44928/files