-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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] Move product versions to page context #35078
[docs] Move product versions to page context #35078
Conversation
Netlify deploy previewhttps://deploy-preview-35078--material-ui.netlify.app/ Bundle size report |
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.
@m4theushw Thanks for pushing in this direction to make the docs infra more customizable. It looks good 👍.
Once this PR is merged I'll open follow-up PRs in Toolpad and MUI X to adapt docs/_app.js.
cc @bharatkashyap, Toolpad will also need to do the same. https://mui.com/toolpad/getting-started/overview/
Regarding the future direction. I think that we should work toward removing the duplication of the _app.js
files. There is quite a lot of logic that should be owned by the docs infra over the MUI X / MUI Toolpad repositories.
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.
👍 Nice!
I'll merge next week after the release. |
|
||
if (product === 'base') { | ||
return { | ||
name: 'MUI Base', |
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.

https://master--material-ui.netlify.app/base/getting-started/overview/
name: 'MUI Base', | |
name: 'Base UI', |
We changed the name since. This information was lost in the rebase of this PR. See the diff lower in the page.
@siriwatknp Do you want to push a quick fix?
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.
Fixed in ec3d7dd. I saw it again doing a demo with a person at React Summit. @michaldudak enjoy 😁
Related to #34296 (comment)
Currently, the information for all products (including versions) is inside https://github.com/mui/material-ui/blob/master/docs/src/modules/components/AppNavDrawer.js. This creates a problem where every time a new version for a product that has its own repo (e.g. MUI X or Toolpad) is going to be developed this file needs to updated to include it, consequently the new version only goes live in the next MUI Core release. This PR addresses this issue by moving the product information to the
PageContext
allowing it to be injected by thedocs/_app.js
file of the respective product repo.Once this PR is merged I'll open follow-up PRs in Toolpad and MUI X to adapt
docs/_app.js
.