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] Complete transition to next branch #11521

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Dec 26, 2023

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/

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation core Infrastructure work going on behind the scenes labels Dec 26, 2023
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)
Copy link
Member Author

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.

Copy link
Member

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? 🤔 🤷

Copy link
Member Author

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.

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 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:

Screenshot 2023-12-28 at 17 24 49

Copy link
Member

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

Copy link
Member Author

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.

Copy link
Member

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

Comment on lines -36 to +34
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>
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

@MBilalShafi MBilalShafi left a 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.

Copy link
Member

@LukasTy LukasTy left a 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)
Copy link
Member

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';
Copy link
Member

Choose a reason for hiding this comment

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

🙌 💯

@oliviertassinari oliviertassinari merged commit 8885684 into mui:next Dec 28, 2023
17 checks passed
@oliviertassinari oliviertassinari deleted the polish-next-branch-structure branch December 28, 2023 16:27
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 docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants