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
[Typography] Improve inherit variant logic #38123
[Typography] Improve inherit variant logic #38123
Conversation
Netlify deploy previewhttps://deploy-preview-38123--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
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.
We probably don't need a test, but I think a comment would be great
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com> Signed-off-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Proposed the same fix in #38124 |
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.
The changes in the component makes sense, I am not 100% convinced about the theme changes. They are breaking after all, and I remember we had issues around this not long ago. We can try to merge, but be ready that we may revert if we see too many complains.
Okay, let's do it in v6. I added this in #30660 to keep track. |
@ZeeshanTamboli This feels overly cautious, but no objections. In this case, I think that we should still move forward with the bulk of the changes however, deprecating the variant instead of removing it. The goal is to control the leak, to not have the problem grow, but decrease over time. |
@oliviertassinari I pushed few changes. Please take a look. |
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.
This looks ideal 👌
@ZeeshanTamboli Thanks for the follow-up, much appreciated, and much better. |
Signed-off-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com> Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com> Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Signed-off-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com> Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com> Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Act on #33621 (comment) to fix #32942
Removes inherit from theme's typography and checks on the Typography component level.
CodeSandbox - https://codesandbox.io/s/blissful-wright-ptzjz3?file=/src/Demo.tsx