-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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 experimental API page duplication #35213
[docs] Fix experimental API page duplication #35213
Conversation
|
{ pathname: '/guides/flow' }, | ||
], | ||
}, |
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 was tempted to remove all the rest, but I didn't to keep this PR relatively small.
/joy-ui/core-features/perfect-dark-mode/ /joy-ui/main-features/perfect-dark-mode/ 301 | ||
/:lang/joy-ui/core-features/perfect-dark-mode/ /:lang/joy-ui/main-features/perfect-dark-mode/ 301 |
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.
This is a double redirection. it was added in https://github.com/mui/material-ui/pull/34613/files#diff-7a0cbac74402caf0e99ba338a9e7c42684580a1f85e149110c3c2ca6e38055afR390 @samuelsycamore A tip, when adding a new redirection, it's a good practice to also update the redirections that might already point to the new "old URL". It avoids a double 301.
/joy-ui/guides/applying-dark-mode/ /joy-ui/customization/dark-mode/ 301 | ||
/:lang/joy-ui/guides/applying-dark-mode/ /:lang/joy-ui/customization/dark-mode/ 301 |
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.
Redirecting the en-US locale isn't enough.
Once we stop this generation of pt, zh pages, we will be able to not have /:lang/
for the redirection of pages first introduced after the generation stopped. So, it's not for tomorrow.
docs/data/material/pages.ts
Outdated
{ | ||
pathname: '/material-ui/experimental-api/css-variables', | ||
title: 'CSS variables', | ||
}, |
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 didn't understand why https://mui.com/material-ui/experimental-api/css-variables/ isn't linked in the side nav of the docs.
If it's because https://mui.com/material-ui/experimental-api/css-theme-variables/overview is meant to replace it, then I think there could be a follow-up to:
- Copy the API section https://mui.com/material-ui/experimental-api/css-variables/#api
- Copy the live demos https://mui.com//material-ui/experimental-api/css-variables/#customizing-components
- Delete this new side nav
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.
From what I remember, initially I added one page for the CSS variables under the Experimental API section. After this, @siriwatknp updated it to include more pages, with usage, tutorial etc, and this is why this page is no longer in the side nav. I guess we can copy what we feel is useful in one of the new pages and drop this page. @siriwatknp what are your thoughts?
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.
Right OK. I'm renaming the page to include "legacy" and will merge. The changes here are still a step forward, and the docs are experimental. We can further cleanup later on.
3db5156
to
0e4b892
Compare
@@ -1,4 +1,4 @@ | |||
# CSS variables | |||
# TODO merge with other pages |
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.
@oliviertassinari I see this in https://mui.com/material-ui/experimental-api/css-variables/. I think your intent was to add a comment here. As for the fix, should we remove this page or keep the heading as CSS variables
?
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 think that the next step is to merge the two pages. https://mui.com/material-ui/experimental-api/css-variables/ is superior in a couple of ways:
- it has an API reference page. https://mui.com/material-ui/experimental-api/css-variables/#api, e.g. it's the only search result for
disableTransitionOnChange
- it has two demos while there is not a single demo on the new pages. I would have expected many simple demos. So developers can play with it and understand what it does.
https://mui.com/material-ui/experimental-api/classname-generator/ and https://mui.com/experimental-api/classname-generator/ have the same content.
Preview: https://deploy-preview-35213--material-ui.netlify.app/material-ui/experimental-api/css-variables/