Skip to content
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] Support interfaces for X docs #41069

Merged
merged 5 commits into from
Feb 22, 2024

Conversation

alexfauquette
Copy link
Member

@alexfauquette alexfauquette commented Feb 12, 2024

Add some customization of the props element to support the interface display in mui/mui-x#12016

The result can be seen here: https://deploy-preview-12016--material-ui-x.netlify.app/x/api/data-grid/grid-api/

@mui-bot
Copy link

mui-bot commented Feb 12, 2024

Netlify deploy preview

https://deploy-preview-41069--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 764ed1a

@alexfauquette alexfauquette added component: data grid This is the name of the generic UI component, not the React module! scope: docs-infra Specific to the docs-infra product labels Feb 12, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 16, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Feb 20, 2024
@alexfauquette alexfauquette marked this pull request as ready for review February 20, 2024 11:05
@@ -155,7 +155,7 @@ type ExpandableApiItemProps = {
isExtendable?: boolean;
note?: string;
sx?: SxProps;
title: string;
title: string | React.ReactNode;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Allows to add a link to the pricing page when it's a pro or premium feature

@@ -122,6 +122,9 @@ interface PropertiesTableProps {

export default function PropertiesTable(props: PropertiesTableProps) {
const { properties } = props;

const hasDefaultColumn = properties.some((item) => item.propDefault !== undefined);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some interfaces don't have default values for all their attributes. In such case we simply don't show the column

@alexfauquette alexfauquette merged commit bd143f4 into mui:master Feb 22, 2024
19 checks passed
@alexfauquette alexfauquette deleted the improve-props-table branch February 22, 2024 09:27
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants