[docs-infra] Type interface API pages#14138
Conversation
|
Deploy preview: https://deploy-preview-14138--material-ui-x.netlify.app/ |
Which types do you mean? |
|
The one I import from But not an issue since those stuff will move to the docs package |
|
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. |
| @@ -131,26 +186,17 @@ export default function ApiPage(props) { | |||
| language="jsx" | |||
| /> | |||
|
|
|||
| {componentDescription ? ( | |||
There was a problem hiding this comment.
Wondering what componentDescription was used for - is it okay to discard completely?
There was a problem hiding this comment.
Yes, component descript does not exist for interfaces. It has interfaceDescription which is already used a bit above in
<Typography
variant="h5"
component="p"
className="description"
gutterBottom
dangerouslySetInnerHTML={{ __html: interfaceDescription }}
/>It's visible for example in GridActionsColDef API
I replace the usual API page description
API reference docs for the React {{componentName}} component. Learn about the props, CSS, and other APIs of this exported module.
But that could probably be improved. I will check with other X memebers what they want for this page
| "/components/pagination": "Pagination" | ||
| }, | ||
| "api-docs": { | ||
| "interfacePageDescription": "API reference docs for the {{name}} interface. Learn about the properties other APIs of this exported module." |
There was a problem hiding this comment.
Maybe have the default be something like:
| "interfacePageDescription": "API reference docs for the {{name}} interface. Learn about the properties other APIs of this exported module." | |
| "interfacePageDescription": "Extended documentation for the {{name}} interface with detailed information on the module's properties and available APIs." |
| type: { description: string }; | ||
| default?: string; | ||
| required?: true; | ||
| isProPlan?: true; |
There was a problem hiding this comment.
Is there a reason not to have a plan?: 'pro' | 'premium' | 'community' here?
There was a problem hiding this comment.
No other reason than "that's what the script returns"
I tried to do the update, but that would require a PR on the core repo to update properties section component
There was a problem hiding this comment.
Would probably make sense to update it at some point, but it's out of the scope of this PR then 👍

Follow up of mui/material-ui#43128
This is the opportunity to find incosistency about description and fix them.
Available slots for description
Illustration
Available descriptions
a. A generic description with a placeholder for the component name:
b. The custom description from the JSDocs of the component (when provided)
Current behavior
On component API
On interface API
Proposal