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] Remove dependency on Material UI #12219

Open
oliviertassinari opened this issue Feb 26, 2024 · 4 comments
Open

[charts] Remove dependency on Material UI #12219

oliviertassinari opened this issue Feb 26, 2024 · 4 comments
Labels
component: charts This is the name of the generic UI component, not the React module! performance

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 26, 2024

Summary

This charts library has a dependency on Material UI and Emotion https://unpkg.com/browse/@mui/x-charts@7.0.0-beta.4/package.json

  "peerDependencies": {
    "@emotion/react": "^11.9.0",
    "@emotion/styled": "^11.8.1",
    "@mui/material": "^5.15.0",
    "react": "^17.0.0 || ^18.0.0",
    "react-dom": "^17.0.0 || ^18.0.0"
  },

which discredit it as a viable alternative to Recharts if you are not already in the MUI ecosystem.

Examples

Once we fix mui/material-ui#40594 we should able to only have a dependency on MUI System/Pigment CSS, which is equivalent to adazzle/react-data-grid#3407.

This issue is potentially a duplicate of #11123. But not necessarily, we could see this one as the extension of mui/material-ui#40594 in MUI X.

Motivation

See:

SCR-20240227-bbzr

https://ably.com/blog/top-react-chart-libraries#mui-x-charts.

This library seamlessly integrates with other MUI components and best suits those already invested in the MUI ecosystem.

It sounds about right. No engineers in their right mind should add MUI X Charts as a dependency unless they already use Emotion.

Search keywords: Material UI dependency

@oliviertassinari oliviertassinari added performance status: waiting for maintainer These issues haven't been looked at yet by a maintainer component: charts This is the name of the generic UI component, not the React module! labels Feb 26, 2024
@oliviertassinari oliviertassinari changed the title [charts] Remove dependency on Material UI [charts] Remove dependency on Material UI Feb 26, 2024
@michelengelen michelengelen removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 27, 2024
@Fabb111
Copy link

Fabb111 commented Apr 9, 2024

This would be really nice for Joy UI users, since they are basically in the MUI ecosystem but cannot use MUI X anyways. This would unlock the charts part at least, which is a great step towards decoupling everything from Material UI.

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Apr 14, 2024

This would be really nice for Joy UI users, since they are basically in the MUI ecosystem but cannot use MUI X anyways._

@Fabb111 Yes, moving to a Pigment CSS dependency, where all the theming logic would move.

We might even:

  • Kill Material UI
  • Kill Joy UI
  • Rewrite with a new foundation, on Pigment CSS and Base UI, have a Joy Design theme by default, have a Material Design theme to opt-in. Have MUI X an extension of that new foundation.

@Fabb111
Copy link

Fabb111 commented Apr 14, 2024

This would be really nice for Joy UI users, since they are basically in the MUI ecosystem but cannot use MUI X anyways._

@Fabb111 Yes, moving to a Pigment CSS dependency, where all the theming logic would move.

We might even:

  • Kill Material UI
  • Kill Joy UI
  • Rewrite with a new foundation, on Pigment CSS and Base UI, have a Joy Design theme by default, have a Material Design theme to opt-in. Have MUI X an extension of that new foundation.

Sounds great. And especially the second option sounds like the perfect long term goal since it would improve the overall adaptability. But I guess this issues goal is a more short- to midterm "quick fix", right? Just for my personal knowledge, do you have a rough timeline for this? Since it's probably not straight forward I expect it would take longer for this to arrive, right?

@oliviertassinari
Copy link
Member Author

For sure, we will do this by step. The team working on the charts's main concern is growing the charts in the React ecosystem, so to fit well with other UI libraries, Shadcn, Mantine, etc. and of course, with the other MUI open source projects.

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! performance
Projects
None yet
Development

No branches or pull requests

3 participants