Skip to content

Conversation

@siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Jul 4, 2024

\

From #42829 (comment)

Updated the docs to fallback to getInitColorSchemeScript in v5 (MUI X needs this).

@mui-bot
Copy link

mui-bot commented Jul 4, 2024

Netlify deploy preview

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

@material-ui/core: parsed: -0.05% 😍, gzip: -0.08% 😍
@mui/joy: parsed: -0.06% 😍, gzip: -0.10% 😍

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 936f554

useColorScheme,
getInitColorSchemeScript: deprecatedGetInitColorSchemeScript,
} = createCssVarsProvider<SupportedColorScheme, typeof THEME_ID>({
const { CssVarsProvider, useColorScheme, getInitColorSchemeScript } = createCssVarsProvider<
Copy link
Member

Choose a reason for hiding this comment

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

We should add the @deprecated tag to getInitColorSchemeScript to hint at it in IDEs

Copy link
Member

Choose a reason for hiding this comment

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

Also suggested here: #42247 (comment)

Copy link
Member Author

Choose a reason for hiding this comment

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

Added.

* + <InitColorSchemeScript />;
* ```
*/
export const getInitColorSchemeScript = getInitColorSchemeScriptSystem;
Copy link
Member

Choose a reason for hiding this comment

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

I've added redeclaration to improve the jsdoc, because it doesn't work well when added to reexport:

Before After
Screenshot 2024-07-05 at 11 53 58 Screenshot 2024-07-05 at 11 53 26

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.

What's with the ci.yml change?

@siriwatknp
Copy link
Member Author

What's with the ci.yml change?

This error https://github.com/mui/material-ui/actions/runs/9806956012/job/27079721815. Not related to this PR, the fix is to upgrade the version but I don't know the root cause.

Ref pnpm/action-setup#135 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: joy-ui Specific to Joy UI. v5.x

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants