material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[material-ui][Select] Apply missing root class

Open sai6855 opened this issue 1 year ago • 2 comments

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

sai6855 avatar Jul 17 '24 05:07 sai6855

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

mui-bot avatar Jul 17 '24 05:07 mui-bot

@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 avatar Aug 21 '24 17:08 sai6855

@sai6855 @DiegoAndai is this PR still relevant?

aarongarciah avatar Dec 25 '24 11:12 aarongarciah

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?

DiegoAndai avatar Dec 27 '24 15:12 DiegoAndai

@sai6855 to fix the argos build, lets close this PR and open a new one with the same changes.

DiegoAndai avatar Jan 02 '25 19:01 DiegoAndai

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

sai6855 avatar Jan 03 '25 08:01 sai6855

Closing as duplicate of https://github.com/mui/material-ui/pull/44928/files

mnajdova avatar Jan 14 '25 07:01 mnajdova