-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] @mui/system has no singleton, it should a dependency #10427
Comments
A note about the future: We are working toward making |
There is a singleton in If we ever become to depend on it in MUI X, we would need to revert. |
Should we consider updating installation instructions instead? -npm install @mui/x-charts
+npm install @mui/x-charts @mui/system This way it will be deduplicated when other MUI packages are used. |
@oliviertassinari Isn't the plan to go the route of only CSS variables when we move towards supporting RSC? Should we just keep the existing behavior for now? 馃 |
We can add @siriwatknp to the discussion as this is part of the code he owns. From my perspective, we are moving towards a future where React context works with RSC, I don't see why they won't implement it, it not being supported isn't part of the initial RSC RFC, it seems to only be a feature that was left on the side to save time. But theoretically speaking, it should be "easy" for a framework to implement, as long as the values in the context can be serialized or are designed to be separate (one context for server, one for client). I think #10427 (comment) is the future that we are trending towards (say 18 months from now), where if you use MUI聽X聽Charts with Material聽UI, you need @mui/system and @mui/material (system no longer being exposed from @mui/material, to distinguish them and to simplify multi-theme support with @mui/joy), but if you use MUI X Charts with Shadcn UI, you need tailwindcss. Personally, I think we can move slower, start by fixing what's wrong today, maybe the future will be different. |
That one is not a small assumption though |
Steps to reproduce 馃暪
Link to live example:
Steps:
Current behavior 馃槸
mui-x/packages/grid/x-data-grid/package.json
Lines 55 to 57 in 9addfb0
Expected behavior 馃
https://github.com/mui/material-ui/blob/f1401844507519e09814bf8ea3ac338ec8011044/packages/mui-lab/package.json#L43-L46
emotion and styled-components are peer dependencies because they have a React theme context singleton. A duplication would break the application. In the case of the system, it's OK for the package to be duplicated in the bundle. It's not great for performance, but it would continue to work.
Context 馃敠
Dependency first added in #3281. Bug discovered by @joserodolfofreitas
Your environment 馃寧
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: