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

[docs] Fix the docs for production class generation #31933

Merged
merged 3 commits into from Jun 22, 2022

Conversation

Fafruch
Copy link
Contributor

@Fafruch Fafruch commented Mar 21, 2022

The docs are not aligned with the actual code. At this very moment the class generation for the "dev" environment and the "prod" environment is different:

  1. "dev":

image

  1. "prod":

image

^ notice no hyphen before the counter ID in the prod one

See also the code:
https://github.com/mui/material-ui/blob/master/packages/mui-styles/src/createGenerateClassName/createGenerateClassName.js#L69

I believe it's a typo, but changing this logic would introduce a breaking change, so I'm suggesting at least updating the docs.

@mui-bot
Copy link

mui-bot commented Mar 21, 2022

No bundle size changes

Generated by 🚫 dangerJS against 54e1288

@danilo-leal danilo-leal added the docs Improvements or additions to the documentation label Mar 22, 2022
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Apr 8, 2022
@mnajdova mnajdova requested a review from siriwatknp May 18, 2022 10:38
@@ -444,7 +444,7 @@ const className = `${sheetName}-${ruleName}-${identifier}`;
const productionPrefix = 'jss';
const identifier = 123;

const className = `${productionPrefix}-${identifier}`;
const className = `${productionPrefix}${identifier}`;
Copy link
Member

Choose a reason for hiding this comment

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

Note that we are not manually changing the translation files, please revert the changes to the advanced-pt.md and the advanced-zh.md files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

Done.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label May 19, 2022
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.

Great catch! Thanks!

@siriwatknp siriwatknp merged commit b145133 into mui:master Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants