Skip to content

Conversation

@siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Jun 14, 2024

Part of #41273

Screen.Recording.2567-06-21.at.15.34.32.mov

@mui-bot
Copy link

mui-bot commented Jun 17, 2024

Netlify deploy preview

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

ScopedCssBaseline: parsed: +11.09% , gzip: +8.41%
@material-ui/core: parsed: +0.15% , gzip: +0.15%
CssBaseline: parsed: +1.51% , gzip: +0.88%
SpeedDialAction: parsed: -0.31% 😍, gzip: -0.30% 😍
Autocomplete: parsed: -0.24% 😍, gzip: -0.27% 😍
Tooltip: parsed: -0.35% 😍, gzip: -0.23% 😍

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against f3075f6

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Only one question

@siriwatknp siriwatknp requested a review from DiegoAndai June 19, 2024 04:26
// When used under CssVarsProvider, colorScheme should not be applied dynamically because it will generate the stylesheet twice for server-rendered applications.
...(enableColorScheme && !theme.vars && { colorScheme: theme.palette.mode }),
...(enableColorScheme &&
!theme.vars && { [`&:has(.${SELECTOR})`]: { colorScheme: theme.palette.mode } }),
Copy link
Member Author

Choose a reason for hiding this comment

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

Glad we bump safari to 15.4, otherwise I have no clue how to make it work 😊

<React.Fragment>
<GlobalStyles styles={(theme) => styles(theme, enableColorScheme)} />
<GlobalStyles />
{enableColorScheme && <span className={SELECTOR} style={{ display: 'none' }} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

What’s the need for enableColorScheme: false?
In other words, why would anyone want the browser to show light color scheme for a dark theme?

Having a hanging span element is another freak (break of principle of least surprise).

Copy link
Member

Choose a reason for hiding this comment

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

That's a good argument, I think we should revisit in v7. For v6 we try to keep the breaking changes minimal, so I wouldn't just the API just yet, only add the opt in support for Pigment CSS.

Copy link
Member

@oliviertassinari oliviertassinari Jun 20, 2024

Choose a reason for hiding this comment

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

Can we do the opposite here? Only a DOM node if the prop is false?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, done.

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.

Can we please add some examples with this components? Just to verify everything works as before.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 20, 2024
@siriwatknp
Copy link
Member Author

Can we please add some examples with this components? Just to verify everything works as before.

Added the demo page and capture the clip in the PR description.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Jun 21, 2024
@siriwatknp siriwatknp requested a review from mnajdova June 24, 2024 04:46
@siriwatknp siriwatknp merged commit f4f199b into mui:next Jun 24, 2024
joserodolfofreitas pushed a commit to joserodolfofreitas/material-ui that referenced this pull request Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: pigment-css Specific to Pigment CSS. v6.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants