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

[styles] Warn if @material-ui/styles is duplicated #15422

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Apr 20, 2019

Use the same strategy than styled components: styled-components/styled-components#1412.

Closes #15264

@oliviertassinari oliviertassinari added new feature New feature or request package: styles Specific to @mui/styles. Legacy package, @material-ui/styled-engine is taking over in v5. labels Apr 20, 2019
@mui-pr-bot
Copy link

mui-pr-bot commented Apr 20, 2019

Details of bundle changes.

Comparing: bdaadb5...c000f54

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core 0.00% 0.00% 311,983 311,983 84,286 84,288
@material-ui/core/Paper 0.00% +0.04% 🔺 67,279 67,279 19,963 19,970
@material-ui/core/Paper.esm 0.00% -0.01% 60,640 60,640 18,883 18,881
@material-ui/core/Popper 0.00% 0.00% 34,907 34,907 11,809 11,809
@material-ui/core/Textarea 0.00% 0.00% 5,327 5,327 2,291 2,291
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 15,898 15,898 5,771 5,771
@material-ui/core/useMediaQuery 0.00% 0.00% 2,106 2,106 973 973
@material-ui/lab 0.00% 0.00% 141,612 141,612 42,721 42,722
@material-ui/styles 0.00% +0.03% 🔺 50,833 50,833 15,012 15,017
@material-ui/system 0.00% -0.03% 11,765 11,765 3,929 3,928
Button 0.00% 0.00% 85,621 85,621 25,584 25,585
Modal 0.00% 0.00% 79,901 79,901 24,015 24,016
colorManipulator 0.00% 0.00% 3,904 3,904 1,543 1,543
docs.landing 0.00% 0.00% 50,908 50,908 11,210 11,210
docs.main +0.06% 🔺 +0.10% 🔺 647,735 648,143 201,782 201,979
packages/material-ui/build/umd/material-ui.production.min.js 0.00% -0.07% 293,282 293,282 82,330 82,274

Generated by 🚫 dangerJS against c000f54

packages/material-ui-styles/src/index.js Outdated Show resolved Hide resolved
packages/material-ui-styles/src/index.js Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari force-pushed the warn-duplicated-material-ui-styles branch 5 times, most recently from c89c707 to b955ba9 Compare April 20, 2019 16:12
@oliviertassinari oliviertassinari marked this pull request as ready for review April 20, 2019 16:12
@oliviertassinari oliviertassinari force-pushed the warn-duplicated-material-ui-styles branch 2 times, most recently from e75e60d to 3764f43 Compare April 20, 2019 16:38
@oliviertassinari oliviertassinari force-pushed the warn-duplicated-material-ui-styles branch from 3764f43 to a7f9ba5 Compare April 20, 2019 17:12
language = prism.languages.tsx;
break;

case 'js':
case 'jsx':
default:
case 'sh':
language = prism.languages.jsx;
Copy link
Member

Choose a reason for hiding this comment

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

That doesn't seem right. Isn't sh an alias for bash?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

This code change doesn't change the logic.

@oliviertassinari oliviertassinari force-pushed the warn-duplicated-material-ui-styles branch from bb53855 to ef19911 Compare April 20, 2019 17:25
@oliviertassinari oliviertassinari force-pushed the warn-duplicated-material-ui-styles branch from 6daff22 to 6a7ca73 Compare April 20, 2019 17:45
@oliviertassinari oliviertassinari merged commit d2fea7f into mui:next Apr 21, 2019
@oliviertassinari oliviertassinari deleted the warn-duplicated-material-ui-styles branch April 21, 2019 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request 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.

@material-ui/styles duplication issue
4 participants