-
-
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-infra] Fixes in API pages generation #37813
[docs-infra] Fixes in API pages generation #37813
Conversation
Netlify deploy previewhttps://deploy-preview-37813--material-ui.netlify.app/ Bundle size report |
docs/data/base/pages.ts
Outdated
@@ -18,7 +18,7 @@ const pages = [ | |||
title: 'Components', | |||
icon: standardNavIcons.ToggleOnIcon, | |||
children: [ | |||
{ pathname: '/base-ui/react-components', title: 'All components' }, | |||
{ pathname: '/base-ui/react-all-components', title: 'All components' }, |
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.
Following the convention for the pages inside /components/
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 could also rename the page to react-components
, but I liked more this url. Happy to iterate on this. cc @danilo-leal
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.
Yeah, I think I also dig "all-components" slightly more, but that's just a loose preference. 😬
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.
My understanding is that the react-*
convention is mostly for SEO purposes, which probably isn't really applicable here. So I would also lean more towards all-components
for the sake of simplicity. (Otherwise, the grammatically correct version would be all-react-components
.)
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.
Alright, I will adjust the script to not consider this file as React component file.
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 :)
I let Danilo answer about the path rename
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.
LGTM! 🫡
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.
Looks good to me as well 🤙
@@ -689,13 +689,23 @@ export const getStaticPaths = () => { | |||
${staticProps} | |||
`; | |||
|
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.
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 fixed another issue with generating docs api pages for the coming soon pages locally. For e.g. running yarn docs:api
locally generates API pages for the checkbox, radio, according etc. It's still makes sense to not generate API pages if there are no components & hooks in the header.
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.
Oh, I see, yarn docs:api
now generates files but the CI doesn't check that no new files aren't committed, hence the CI didn't catch the regression I introduced in #37941. So part of my revert was correct, the other part was wrong. Oops
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'm cleaning my mess: #38039.
Fixes introduced: