Skip to content
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

Conversation

ZeeshanTamboli
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli commented Jul 23, 2023

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

@ZeeshanTamboli ZeeshanTamboli added component: Typography The React component. package: material-ui Specific to @mui/material customization: theme Centered around the theming features enhancement This is not a bug, nor a new feature labels Jul 23, 2023
@mui-bot
Copy link

mui-bot commented Jul 23, 2023

Netlify deploy preview

https://deploy-preview-38123--material-ui.netlify.app/

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 1546eb9

@ZeeshanTamboli ZeeshanTamboli marked this pull request as ready for review July 23, 2023 13:16
Copy link
Member

@oliviertassinari oliviertassinari left a 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>
@oliviertassinari
Copy link
Member

Proposed the same fix in #38124

@oliviertassinari oliviertassinari removed the customization: theme Centered around the theming features label Jul 23, 2023
Copy link
Member

@mnajdova mnajdova left a 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.

@ZeeshanTamboli
Copy link
Member Author

Okay, let's do it in v6. I added this in #30660 to keep track.

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 28, 2023

Okay, let's do it in v6.

@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.

@ZeeshanTamboli
Copy link
Member Author

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.

@oliviertassinari I pushed few changes. Please take a look.

Signed-off-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Copy link
Member

@oliviertassinari oliviertassinari left a 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 ZeeshanTamboli merged commit 6cd17b8 into mui:master Aug 3, 2023
18 checks passed
@ZeeshanTamboli ZeeshanTamboli deleted the improve-typograhy-variant-inherit-logic branch August 3, 2023 14:08
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 3, 2023

@ZeeshanTamboli Thanks for the follow-up, much appreciated, and much better.

richbustos pushed a commit that referenced this pull request Aug 4, 2023
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>
richbustos pushed a commit that referenced this pull request Aug 7, 2023
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Typography The React component. enhancement This is not a bug, nor a new feature package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Link with component=button does not use custom font
4 participants