Repository navigation
fix(tech-radar): import Typography from its public entry point - #11580
Open
jozsefurak-seon wants to merge 2 commits into
Open
jozsefurak-seon wants to merge 2 commits into
jozsefurak-seon wants to merge 2 commits into
Conversation
RadarLegendRing imported @material-ui/core/Typography/Typography, which resolves to the CommonJS build and loads a second copy of Typography. Its stylesheet is injected after the app's styles, so while the radar is shown it overrides every class that restyles Typography (for example the sidebar's). Signed-off-by: jozsefurak-seon <[email protected]>
Contributor
Changed Packages
|
vinzscam
requested changes
Oct 12, 2026
Co-authored-by: Vincenzo Scamporlino <[email protected]> Signed-off-by: József Urak <[email protected]>
1 task done
12 of 46 tasks
Contributor
|
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey, I just made a Pull Request!
RadarLegendRingimportsTypographyfrom@material-ui/core/Typography/Typography. That path resolves to the CommonJS file of the component, so the app bundles a second copy ofTypographynext to the one every other package gets from@material-ui/core/Typography(the ESM build). Material UI v4 only supports first and second level imports and warns that deeper ones can duplicate modules.The second copy loads only with the radar, so its stylesheet is injected after the app's styles. While the radar is shown, its
.MuiTypography-rootrules win over every class that restylesTypography, also outside the plugin:<head> <style data-meta="MuiTypography"> shared Typography (ESM) <style data-meta="makeStyles"> app styles, e.g. the sidebar logo margin-left: 24px + <style data-meta="MuiTypography"> second Typography (CommonJS), added with the radar: margin: 0 winsIn our app this moved the sidebar logo left (1) and made the sidebar labels medium instead of bold (2) on the radar tabs. Both came back on a tab without the radar, so switching tabs made the sidebar jump. The sidebar is the stock one from
@backstage/core-components.Before
After
The
ClassNameMapimports from@material-ui/core/styles/withStylesare type-only and removed at build time, so I left them.✔️ Checklist
Signed-off-byline in the message. (more info)