-
-
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 Material UI's API linking to Base UI #37121
Conversation
Netlify deploy previewhttps://deploy-preview-37121--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.
Works for all components, but only not for ClickAwayListener
:
- https://deploy-preview-37121--material-ui.netlify.app/material-ui/react-menu/#api
- https://deploy-preview-37121--material-ui.netlify.app/material-ui/react-click-away-listener/#api
It is the only component that should point to the Base UI API. I think we will have to whitelist its file. A test for this component specifically would also be helpful.
Nice catch, let me fix it. |
@@ -38,9 +38,9 @@ const packages = [ | |||
{ | |||
product: 'material-ui', | |||
paths: [ | |||
path.join(__dirname, '../../packages/mui-base/src'), |
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.
Material UI API links should win over the Base UI ones in case of a conflict in names.
Signed-off-by: Marija Najdova <mnajdova@gmail.com>
@ZeeshanTamboli all should be good now |
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 nice, so it fixes #36873 (comment)? |
Yep, https://deploy-preview-37121--material-ui.netlify.app/material-ui/react-slider/ |
However, this PR breaks something else 🙃
Maybe we could simply write the API section in markdown for these deprecated docs pages (portal, no-ssr, textarea-autosize), rather than generating it. |
@oliviertassinari It's the same issue as #37121 (review). Should be fixed in #37175. Is 301 not good? |
The API links on the Material UI's documentation that conflicts with Base UI's components name, have the wrong links, for e.g.: https://mui.com/material-ui/react-button/#api (the Button link is pointing to the wrong API).
The problem comes from the fact that initially we were planning to use the Base UI's components inside Material UI, so we thought that we would like to document the Base UI components on the Material UI's pages. However, this is no longer the case, as we decided to use the headless hooks. We can basically drop this assumption now.
The problem arise after removing the
unstyled
suffix from the Base UI's components, so the names of the components conflicted.Here is a link for verifying the fix: https://deploy-preview-37121--material-ui.netlify.app/material-ui/react-button/#api
Resolves #36873 (comment)