-
-
Notifications
You must be signed in to change notification settings - Fork 1.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-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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering what componentDescription
was used for - is it okay to discard completely?
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, 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
docs/translations/translations.json
Outdated
@@ -142,5 +142,8 @@ | |||
"/components/backdrop": "Backdrop", | |||
"/components/alert": "Alert", | |||
"/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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to have a plan?: 'pro' | 'premium' | 'community'
here?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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