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

[material-ui][docs] Add an "All components" page #40256

Merged
merged 11 commits into from
Dec 21, 2023

Conversation

danilo-leal
Copy link
Contributor

@danilo-leal danilo-leal commented Dec 20, 2023

This PR adds an "All components" page to the Material UI docs, similar to the one we have on Base UI. It serves the same purpose as the "Supported components" page, as it also displays which guidelines each component follows. The difference is that on that page, we mention components that Material UI currently doesn't support but are documented in the Material Design documentation. There's also a handy link to the Material docs there that this new one doesn't. These two pages are definitely overlapping, but we can keep pondering whether or not to maintain both (which I wonder if it makes sense).

https://deploy-preview-40256--material-ui.netlify.app/material-ui/all-components/

@danilo-leal danilo-leal added docs Improvements or additions to the documentation package: material-ui Specific to @mui/material labels Dec 20, 2023
@danilo-leal danilo-leal self-assigned this Dec 20, 2023
@mui-bot
Copy link

mui-bot commented Dec 20, 2023

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against a4e5619

@danilo-leal danilo-leal requested review from mnajdova, DiegoAndai and a team December 20, 2023 14:50
@danilo-leal danilo-leal marked this pull request as ready for review December 20, 2023 14:50
Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

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

Looks really amazing 🎉
I left a couple of comments but nothing major

@zanivan
Copy link
Contributor

zanivan commented Dec 20, 2023

This looks good! It's great to have an overview like this, with a visual aid for components—it can help developers who aren't so sure about which component to use for a specific situation; now, it's just a matter of eyeing this page 👀

One nit, the No guidelines chip has a hover state on it, while the MD2 and MD3 don't.


Also, do you think it'd makes sense to add a button to the component API page?

@danilo-leal
Copy link
Contributor Author

Also, do you think it'd makes sense to add a button to the component API page?

While I definitely don't think that's a bad idea, I'm hesitating to add the visual and interaction complexity that will come with the two buttons we'd need to add (one for the API page, another for the demo page), given the entire card wouldn't be clickable anymore. Also, another thing that makes me hold on a bit is that there are more component API pages than demo pages (e.g., the Card component has Card Action, Card Media, Card Content, etc.), which wouldn't map 1:1 to the illustrations. 😕

@danilo-leal danilo-leal merged commit 60c08fa into mui:master Dec 21, 2023
19 checks passed
@danilo-leal danilo-leal deleted the material-ui-all-components-page branch December 21, 2023 11:32
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 22, 2023
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

Happy to see this page 👍

I created #40304 to cover the color.

Comment on lines +33 to +42
<ComponentShowcaseCard
link={link}
name={name}
srcLight={srcLight}
srcDark={srcDark}
md1={md1}
md2={md2}
md3={md3}
noGuidelines={noGuidelines}
/>
Copy link
Member

Choose a reason for hiding this comment

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

Regarding the performance of the page, there is room to significantly improve the UX:

  • prefetch={false} on the Next.js link, on the side nav. We load a tone of JavaScript. Effectively Next.js fetches each page as soon as it is in the viewport. This would defer it to be only on hover.
  • loading="lazy" on the images, it seems that we load them too eagerly.
  • Use SVG over PNG image to reduce the load time where it helps.

Same issues on https://mui.com/base-ui/all-components/.

mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants