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

[core] Remove more dependencies on @material-ui/styles #26100

Merged
merged 2 commits into from
May 3, 2021

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova commented May 3, 2021

BREAKING CHANGES

createGenerateClassName

  • The createGenerateClassName module is no longer exported from @material-ui/core/styles. You should import it directly from @material-ui/styles.

    -import { createGenerateClassName } from '@material-ui/core/styles';
    +import { createGenerateClassName } from '@material-ui/styles';

jssPreset

  • The jssPreset variable is no longer exported from @material-ui/core/styles. You should import it directly from @material-ui/styles.

    -import { jssPreset } from '@material-ui/core/styles';
    +import { jssPreset } from '@material-ui/styles';

ServerStyleSheets

  • The ServerStyleSheets class is no longer exported from @material-ui/core/styles. You should import it directly from @material-ui/styles.

    -import { ServerStyleSheets } from '@material-ui/core/styles';
    +import { ServerStyleSheets } from '@material-ui/styles';

StylesProvider

  • The StylesProvider component is no longer exported from @material-ui/core/styles. You should import it directly from @material-ui/styles.

    -import { StylesProvider } from '@material-ui/core/styles';
    +import { StylesProvider } from '@material-ui/styles';

useThemeVariants

  • The useThemeVariants hook is no longer exported from @material-ui/core/styles. You should import it directly from @material-ui/styles.

    -import { useThemeVariants } from '@material-ui/core/styles';
    +import { useThemeVariants } from '@material-ui/styles';

This PR removes the re-exported utliities from @material-ui/styles in @material-ui/core, as a requirement for removing the dependency to @material-ui/styles in core.

@mui-pr-bot
Copy link

mui-pr-bot commented May 3, 2021

Details of bundle changes

@material-ui/core: parsed: -0.29% 😍, gzip: -0.32% 😍

Generated by 🚫 dangerJS against 4dfd696

+import { StylesProvider } from '@material-ui/styles';
```

# useThemeVariants
Copy link
Member

Choose a reason for hiding this comment

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

Has this ever been public?

Copy link
Member Author

Choose a reason for hiding this comment

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

I saw that it was exported. We can even remove it, with the new styles engine is not required anymore.

Copy link
Member Author

Choose a reason for hiding this comment

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

Would leave it in the end when we cleanup the @material-ui/styled package, I'd just remove it from @material-ui/core/styles right now.

docs/src/pages/guides/migration-v4/migration-v4.md Outdated Show resolved Hide resolved
@@ -112,7 +112,8 @@ We will see how this is passed along in the `renderFullPage` function.
import express from 'express';
Copy link
Member

Choose a reason for hiding this comment

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

Looks like this page is outdated now

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, should we drop it? We should maybe just change to content to reflect the new styled engine

Copy link
Member

Choose a reason for hiding this comment

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

We could do this, maybe in a follow-up?

Copy link
Member Author

Choose a reason for hiding this comment

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

Leaving this comment open for visibility then

@@ -2,7 +2,8 @@ import express from 'express';
import * as React from 'react';
Copy link
Member

Choose a reason for hiding this comment

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

At some point, we can kill @ServerStyleSheets` from this example

@mnajdova mnajdova merged commit ef822e7 into mui:next May 3, 2021
@zannager zannager added package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5. core Infrastructure work going on behind the scenes labels Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants