material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[system] Add `defaultMode` to `InitColorSchemeScript`

Open siriwatknp opened this issue 1 year ago • 1 comments

closes #43972

Root cause

InitColorSchemeScript has a hard-coded default mode as system when the user first visit to the site, however this contradict the flow if the project has <ThemeProvider defaultMode="light"> on user's dark environment.

Solution

  • Add defaultMode to InitColorSchemeScript.
  • Update docs to make sure that both places are defined for custom defaultMode.

siriwatknp avatar Oct 17 '24 07:10 siriwatknp

Netlify deploy preview

Bundle size report

Details of bundle changes (Toolpad) Details of bundle changes

Generated by :no_entry_sign: dangerJS against ab80c0848676b0498e6ead28a3f5747ec631fcba

mui-bot avatar Oct 17 '24 07:10 mui-bot

@siriwatknp what do you think about my previous comments?

oliviertassinari avatar Oct 21 '24 10:10 oliviertassinari