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] Move product versions to page context #35078

Merged
merged 5 commits into from
May 17, 2023

Conversation

m4theushw
Copy link
Member

@m4theushw m4theushw commented Nov 9, 2022

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 the docs/_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.

@m4theushw m4theushw added the docs Improvements or additions to the documentation label Nov 9, 2022
@mui-bot
Copy link

mui-bot commented Nov 9, 2022

Netlify deploy preview

https://deploy-preview-35078--material-ui.netlify.app/

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against f049dc3

@m4theushw m4theushw marked this pull request as ready for review November 11, 2022 17:18
Copy link
Member

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

@oliviertassinari oliviertassinari added the scope: docs-infra Specific to the docs-infra product label Nov 12, 2022
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 14, 2022
@m4theushw m4theushw mentioned this pull request Mar 3, 2023
1 task
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label May 11, 2023
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

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

👍 Nice!

@m4theushw
Copy link
Member Author

I'll merge next week after the release.

@m4theushw m4theushw merged commit 14e0906 into mui:master May 17, 2023
@m4theushw m4theushw deleted the move-product-versions-to-page-context branch May 17, 2023 11:58

if (product === 'base') {
return {
name: 'MUI Base',
Copy link
Member

@oliviertassinari oliviertassinari May 20, 2023

Choose a reason for hiding this comment

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

Screenshot 2023-05-23 at 01 09 21

https://master--material-ui.netlify.app/base/getting-started/overview/

Suggested change
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?

Copy link
Member

@oliviertassinari oliviertassinari Jun 2, 2023

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 😁

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 scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants