-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Complete transition to next branch #11521
[docs] Complete transition to next branch #11521
Conversation
You can use the `localeText` prop to pass in your own text and translations. | ||
You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/grid/x-data-grid/src/constants/localeTextConstants.ts) | ||
You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/-/packages/grid/x-data-grid/src/constants/localeTextConstants.ts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A trick from mui/material-ui#36729, it turns the URL into a permalink at build time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we initially have it like this, but faced some issues? 🤔
I can't remember now, but maybe @cherniavskii remembers? 🤔 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we initially have it like this, but faced some issues?
The last PR that touched this line is #4080. Which surfaces the value of the change (we changed the source location, so the older versions of the docs are now broken).
It works as expected in https://deploy-preview-11521--material-ui-x.netlify.app/x/react-data-grid/localization/#translation-keys.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will take my chances. If we find problem, let's reference mui/material-ui#36729 once we do. This way, we can look at that PR external links and easily find this back:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, let's try it. 👍
But another nitpick for @mui/xgrid, WDYT, would it make sense to have this link branch dependent in case the file has differences between master and next? 🤔
And what about legacy versions, like v5? When that becomes legacy, the link would still point to the newest current branch, which not be what we would expect. 🤷
It could make sense to have a similar process for such links as we have with <!-- #default-branch-switch -->
. 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukasTy I don't follow you. With this PR Netlify preview, the link in the HTML page is https://github.com/mui/mui-x/blob/v7.0.0-alpha.6/packages/grid/x-data-grid/src/constants/localeTextConstants.ts. It's converted at build time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, everything looks great on next, but I was thinking about the next major and how we should/could handle links to source code in general. 😉
npx @mui/x-codemod v6.0.0/data-grid/preset-safe <path> | ||
npx @mui/x-codemod@latest v6.0.0/data-grid/preset-safe <path> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://stackoverflow.com/questions/73184553/npx-does-not-look-for-latest-version-of-package for why. It's a bug in npx: npm/cli#4108.
I faced this with Toolpad mui/mui-toolpad#2346 (comment).
Also why Next.js has @latest
in https://nextjs.org/ or in https://nextjs.org/docs/app/building-your-application/testing/jest#quickstart.
Deploy preview: https://deploy-preview-11521--material-ui-x.netlify.app/ Updated pages: |
e3919b6
to
45276c7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing such important remaining changes. Seems we didn't consider #default-branch-switch
hash tag during infra setup.
I added this PR in the references of the release document too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Superb improvement! 💯 💙
You can use the `localeText` prop to pass in your own text and translations. | ||
You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/HEAD/packages/grid/x-data-grid/src/constants/localeTextConstants.ts) | ||
You can find all the translation keys supported in [the source](https://github.com/mui/mui-x/blob/-/packages/grid/x-data-grid/src/constants/localeTextConstants.ts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we initially have it like this, but faced some issues? 🤔
I can't remember now, but maybe @cherniavskii remembers? 🤔 🤷
// #default-branch-switch | ||
// Use the "latest" npm tag for the master git branch | ||
// Use the "next" npm tag for the next git branch | ||
return 'next'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌 💯
I iterated on https://www.notion.so/mui-org/MUI-X-Major-version-release-process-a27f296dfb9e4b33bdb767f3d6e8018c?d=f7462ff3fce140f68d7a67a2605270f2 to improve the swap experience.
Initially, I was only going to document this step missing https://www.notion.so/mui-org/MUI-X-Major-version-release-process-a27f296dfb9e4b33bdb767f3d6e8018c?pvs=4#d397efa2780a4cc1b7d9495277d8b05f (and did it to fix the strange demo live edit line text misalignment), but saw more stuff that are wrong, I couldn't help myself.
Preview: https://deploy-preview-11521--material-ui-x.netlify.app/x/introduction/