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

[charts][docs] Improve landing page #11570

Merged
merged 2 commits into from
Jan 5, 2024

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jan 3, 2024

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation component: charts This is the name of the generic UI component, not the React module! labels Jan 3, 2024
@mui-bot
Copy link

mui-bot commented Jan 3, 2024

Deploy preview: https://deploy-preview-11570--material-ui-x.netlify.app/

Updated pages:

Generated by 🚫 dangerJS against 8ec76f3

Additionally, you can also use all the MUI System tools, such as the theme override or the `sx` prop.
Additionally, you can also use all the [MUI System](https://mui.com/system/getting-started/) tools, such as the theme override or the `sx` prop.
Copy link
Member Author

@oliviertassinari oliviertassinari Jan 3, 2024

Choose a reason for hiding this comment

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

It wasn't super clear to me what "use all the MUI System tools" means, I imagine it won't for developers as well.


Off-topic. Today, it's kind of crap for the charts to have a dependency on @mui/system vs. say Tailwind CSS or even better: a CSS file / inline style for a developer that is outside of the MUI ecosystem and is looking for great charts. Now, we are still at a phase where charts have enough room to grow inside the MUI ecosystem, so it's not important and even helping (it's important for the data grid though).

I believe there are two main changes that we depend on Core we can/should make that will make this great:

  • @mui/system moving to runtime-less CSS-in-JS. I would expect https://bundlephobia.com/package/@mui/system@5.15.2 to go from 20KB gzipped to 2KB gzipped if we play this well. I'm not exactly sure how to keep the createTheme helpers super small, but there must be a way. For developers, assuming they configure it correctly (as they would have to configure Tailwind CSS). It means that there is almost no downside for folks who don't want to use MUI System. For example, when using recharts or highcharts, everything is inline style. Now, with a canvas implementation of charts, we would have to get there, making @mui/system an optional peer dependency (peer because I imagine it will host a context, so a singleton). For example, react-data-grid is on Linaria, they pulled it off. I envision this will be almost the same, but that CSS file generated would be theme aware.
  • @mui/material moving to not longer having a default theme, forcing the developer to configure @mui/system and consume directly from it. For the charts, data grid, this would mean that importing from a Material UI component wouldn't come with as much overhead as it does today. e.g. solving Material-ui is a heavy dependency for a few icons adazzle/react-data-grid#1999

I'm adding @brijeshb42 and @mnajdova for context so they are aware of the need for MUI X, and what's at stake.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the mention, it's good to know. I haven't seen the implementation, so I'll just ask here, do the charts use any Material UI component or it's only about the MUI System? What you are proposing makes sense long term 👍


## Using the documentation

The MUI X Charts documentation has a slightly different structure than other MUI components.
The MUI X Charts documentation has a slightly different structure than other MUI X components.
Copy link
Member Author

Choose a reason for hiding this comment

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

Per #11556 (comment), moving toward never referencing MUI in the docs.

Comment on lines 28 to 34

### All MUI X Charts components
## All MUI X Charts components

{{"component": "modules/components/ChartComponentsGrid.js"}}

### Supported features
## Supported features

Copy link
Member Author

Choose a reason for hiding this comment

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

It feels strange as h3

component="h2"
component="h3"
Copy link
Member Author

Choose a reason for hiding this comment

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

@oliviertassinari oliviertassinari changed the title [docs] Improve chart landing page [docs][charts] Improve landing page Jan 3, 2024
@oliviertassinari oliviertassinari changed the title [docs][charts] Improve landing page [charts][docs] Improve landing page Jan 3, 2024
@oliviertassinari oliviertassinari merged commit 96894be into mui:next Jan 5, 2024
@oliviertassinari oliviertassinari deleted the link-system branch January 5, 2024 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: charts This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants