-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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
[Checkbox] Fix custom icon fontSize prop support #21362
Conversation
Details of bundle changes.Comparing: edb2d63...31be959 Details of page changes
|
@oliviertassinari The following example is now working:
Please review the changes in the test case :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work. Could you add a test to RadioGroup.test.js
to illustrate what you're fixing?
@kn1ves Thanks for testing that path out. It was my bad, we don't face this problem with the radio component. Sorry for leading you in a dead-end from the issue discussion. |
There were no changes required in the Radio component, it is working as intended. The only changes made were in the Checkbox component. |
@kn1ves I think that what Sebastian meant was that the visual regression test might be "light", we could easily add a functional test, like testing the right class name is applied. The best proof of that argument is that we broke the visual test in the past without noticing (and are now fixing it) |
@oliviertassinari Ohh okay, I'll take a look into it. Thanks :) |
@kn1ves Heads up, I'm adding a quick test so we can include it in one of the last releases of v4.x |
36643ef
to
31be959
Compare
Alright, do you still need me to work on creating a test? I wasn't familiar with chai otherwise I'd have one created by now, sorry for the delay. |
@kn1ves No problem, I think that we are good now :) |
@kn1ves It's a great first pull request on Material-UI 👌🏻. Thank you for working on it! |
I tried a couple of different things and this solution works great. I almost feel guilty because I couldn't really change much from the original solution provided by @oliviertassinari except the fact that
size: PropTypes.oneOf(['medium', 'small']),
doesn't require any changes since this refers to the size prop of the Checkbox component and the issue was caused by the fontSize prop of the icon being used.Also, I tested the Radio component for the same issue and it seemed to be working fine, unless I'm missing something obvious?
Closes #21289