-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Remove randomized API page layout #11876
[docs-infra] Remove randomized API page layout #11876
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Deploy preview: https://deploy-preview-11876--material-ui-x.netlify.app/ |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
Thanks!
@@ -0,0 +1,5 @@ | |||
export const dataGridLayoutKeys = { | |||
slots: 'dataGrid_apiPage_slots', |
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.
Side note: I just realized that the slots section is missing the v7 data grid docs:
v6: https://mui.com/x/api/data-grid/data-grid/#slots
v7: https://next.mui.com/x/api/data-grid/data-grid/#slots
Any ideas on how to bring it back? 😅
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.
Yes, the slots are generated by detecting interfaces named [componentName]Slots
.
You can override this behavior with slotInterfaceName
Here is the uscase for date pickers:
https://github.com/mui/mui-x/blob/master/scripts/buildApiDocs/pickersSettings/getComponentInfo.ts/#L26-L28
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 added the fix
import jsonPageContent from './data-grid-premium.json'; | ||
|
||
export default function Page(props) { | ||
const { descriptions, pageContent } = props; | ||
return <ApiPage descriptions={descriptions} pageContent={pageContent} />; | ||
return ( |
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.
These pages are now generated by ComponentApiBuilder
🙃
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
From mui/material-ui#40862 Allows data grid API pages to use list by default thanks to the
defaultLayout
props