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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Fix the crash when applying custom colors #30563

Merged
merged 4 commits into from
Jan 10, 2022

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Jan 10, 2022

@mui-pr-bot
Copy link

mui-pr-bot commented Jan 10, 2022

No bundle size changes

Generated by 馃毇 dangerJS against 7e24864

Comment on lines -219 to -220
...brandingDesignTokens.palette,
...paletteColors,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the root cause. the whole primary which contains only main property replace the branding color (50-900) are gone. So it causes the crash in some part that tries to use alpha(...500).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I wonder if we shouldn't push it further, by only updating the demos, leaving the rest of the docs unchanged. I have noticed a couple of cases that are weird when setting the colors to red:

  • Partially colored links:
    Screenshot 2022-01-10 at 23 42 00
  • Partially colored sidenav:
    Screenshot 2022-01-10 at 23 42 35

Comment on lines +134 to +135
primary: { main: outerTheme.palette.primary.main },
secondary: { main: outerTheme.palette.secondary.main },
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to change to this so that light and dark are recalculated based on the main color.

Copy link
Member

@hbjORbj hbjORbj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@hbjORbj hbjORbj added docs Improvements or additions to the documentation regression A bug, but worse labels Jan 10, 2022
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.

Looks good 馃憣

@hbjORbj hbjORbj merged commit 60e3ea3 into mui:master Jan 10, 2022
@mbrookes
Copy link
Member

Could we publish this ASAP please? Two more reports today, so presumably many more users affected.

@hbjORbj hbjORbj mentioned this pull request Jan 10, 2022
1 task
@oliviertassinari oliviertassinari added the bug 馃悰 Something doesn't work label Jan 10, 2022
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.

The fix looks great 馃憤

Comment on lines -219 to -220
...brandingDesignTokens.palette,
...paletteColors,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, I wonder if we shouldn't push it further, by only updating the demos, leaving the rest of the docs unchanged. I have noticed a couple of cases that are weird when setting the colors to red:

  • Partially colored links:
    Screenshot 2022-01-10 at 23 42 00
  • Partially colored sidenav:
    Screenshot 2022-01-10 at 23 42 35

wladimirguerra pushed a commit to wladimirguerra/material-ui that referenced this pull request Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 馃悰 Something doesn't work docs Improvements or additions to the documentation regression A bug, but worse
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Setting custom color in playground breaks docs
6 participants