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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][joy-ui] Remove warning from getInitColorSchemeScript #42838

Merged
merged 7 commits into from
Jul 5, 2024

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).

@siriwatknp siriwatknp added package: material-ui Specific to @mui/material v5.x package: joy-ui Specific to @mui/joy labels Jul 4, 2024
@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 @mui/joy package: material-ui Specific to @mui/material v5.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants