-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[discussion] Preparing v6 #30660
Comments
What change does this fall under?
I'm curious for the reason behind removing Edit: It looks like it was added in f98d52b so I believe the reason must be that |
Hi everyone, not sure this is the best place to post my request, but it seems to me that V6 of MUI should also bring some "standardization" in a way to manipulate the styles. Let me give you an example. Do not hesitate to move my comment elsewhere I spent a couple of hours to find how to style the " I came up with this solution for the "MuiLink" component in the createTheme: styleOverrides: {
root: () => {
return {
borderColor: themePalette.SECONDARY_COLOR,
"&:hover": { //<--- :hover is also working. the & is not mandatory
borderColor: themePalette.SECONDARY_COLOR,
color: "white",
},
"&.active": { // <--- .active is not working... Need the &
background: themePalette.THIRD_COLOR,
color: themePalette.SECONDARY_COLOR,
fontWeight: "bold",
},
};
},
}, That might be obvious for you BUT here is the trick: I'm not very familiar with pure CSS, maybe in a CSS file this is also working this way, but for TS or JS, a standardization might be really powerful. Anyway, your library is so great. Thks for your job and happy new year. |
It would be great to know your thoughts and to know whether you consider:
|
This comment was marked as resolved.
This comment was marked as resolved.
@o-alexandrov I have added a new section for big feature ideas for v6.
|
How about simplifying MUI's codebase on how you do animation by adopting framer-motion, Transitions in particular?
|
@o-alexandrov I saw few days ago that the Chakra UI team noted in their 3.0 roadmap that they want to remove the framer motion dependency:
their roadmap post is here: chakra-ui/chakra-ui#7180 so maybe doing that would actually be the best solution, allow framer motion or any other motion library to replace (mui) motion, similar to how it is done for date libraries and probably similar to the idea of removing the dependency on emotion to allow other css-in-js libraries as alternatives (see style engine discussion #34826 that emerged after the nextjs / server components discussion started: #34896) |
With regard to static CSS extraction, would/could this cover use cases where theme configs are loaded dynamically at runtime? For example, I have an app that has a different color scheme based on the customer that it's deployed for and the theme config is fetched on page load and applied to the app. Would it be possible to fetch the theme configs at build time? Or maybe export the theme config variables as global CSS variables that can then be overridden at runtime? |
Is the compatibility of pigment-css with MUI-X planned for the initial release of v6? |
@JoseVSeb This isn't really in our target. MUI X has about 20% of the use relative to Material UI. It's also almost has much work as in Material UI to support. So it makes more sense for us to first prove that the model works with Material UI before expending.
|
Will it be possible to use Material UI v6 in combination with MUI X at all (with or without MUI being on Pigment while MUI X still uses emotion) when it launches? From looking at the MUI X repository there doesn't seem to be any effort right now to support MUI v6. MUI X is currently a blocking issue for testing out the v6 release. We used to follow along with alphas and betas in a test branch to not have all breaking changes come in at once, but that hasn't been possible with v6 in combination with MUI X. |
@Studio384 What issue did you face?
I don't know. The interdependency rules we have between projects https://mui-org.notion.site/Introduction-5933bc8bccf544c7aca78d0033ded787 won't really answer your question. We say "Upstream (Material UI) and Downstream (MUI X) are responsible for Downstream adoption of upstream" and "In the short-term, Downstream (MUI X) decides when they adopt the upstream changes (Material UI) but it can't take more than one major cycle". |
MUI X v7 currently requires MUI v5 and only v5. So from what I get here, you're saying it might take until MUI v7 before MUI X supports MUI v6? |
Is MUI v6 with Pigment CSS compatible with Remix? It's not listed as a supported framework even though Remix is just a Vite plugin these days: I can only seem to get Pigment CSS working when SSR is disabled: |
Hi, @Studio384 I'm confirming that MUI X v7 will support Material UI v6 once there is a stable release. |
hello @oliviertassinari , just tried the beta and followed the upgrade guide on a new nextjs project. Seems pigment is working but all material ui components are still using emotion. I also built material-ui repo and looked at the demo app, it works and mui uses pigment. So I'm probably missing something. Is there a way to completely remove emotion and prevent it from being loaded unintentionally? |
I have been facing this as well. pigment works fine. but it's not being used for mui components. they still rely on emotion at runtime. an example would be nice. |
This is what I had to do to get things working with
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
pigment({
theme: extendTheme(...),
transformLibraries: ['@mui/material'],
}),
react(),
],
}); After that the MUI components would start picking up the Theme customizations using Pigment. Sorry, I don't use NextJS so I don't know what the same approach there would look like. |
That's what I was missing. Thanks. |
Thanks, @gaetansnl, @rossipedia, and @JoseVSeb, for pointing out this issue; this was indeed missing in the guide. We're adding it: #43217 |
Thanks all for this amazing project. Possible I'm doing something wrong, but when I add that
I removed the ThemeProvider first. I have not customized a theme, so that's not present. If any additional information would be helpful, I'm happy to provide. |
I'm having issues using MUI v6 Beta w/ Pigment CSS in a Remix project. I'm getting error: [vite] Error when evaluating SSR module /app/root.tsx: failed to import "@mui/material"
|- /home/projects/github-ctaqne-71kwv1/node_modules/@mui/material/index.js:9
import * as colors from './colors';
^^^^^^
SyntaxError: Cannot use import statement outside a module I've taken a popular template kiliman/remix-vite-mui and followed all steps in the migration path to replace emotion with pigment, including using the updated instructions for the next beta release Here's my upgraded version of the template - hopefully something I've just done wrong, and if so any pointers on how to fix would be greatly appreciated! |
Same error with my Remix app. I wasn't sure if it was a Remix or Vite issue at the time. |
@sdriffill-tm @endaquigley I dunno if you can call this a full fledged "starter", but here's a Remix repo I set up where I got MUI6 and Pigment working: https://github.com/rossipedia/remix-mui-6 Maybe it can help get y'all unstuck 👍 |
@rossipedia thanks for your help. I noticed that your components aren't rendering as expected either: I'm guessing that's related to this comment #30660 (comment) |
Hey @xml, @sdriffill-tm, and @endaquigley! Thanks for the reports. May I ask you to create separate issues for these? This way, it will be easier to track, debug, and respond to 😊 |
@endaquigley wow you're right. it was working perfectly with beta 2 🤔. It also works as expected in Production, it's just |
Material UI v6 is stable! 🚀 Thanks, everyone, for contributing to the discussion. Hopefully, you can try the new major and provide feedback. If you have any issues or suggestions, please create separate issues to track those 😊. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. |
Edited by @DiegoAndai: Moved accepted ideas/issues into either the v6 milestone, the v7 milestone, or this list of brainstorm ideas
This is an umbrella issue that centralizes and lists all the potential improvements that we can consider in MUI Core v6. The potential improvements being listed here require breaking changes. We do not intend to ship v6 in 2022. We plan, as much as possible, to release the next major features in minor versions without breaking changes.
Big features
Other changes
For a detailed list of changes, please visit the Material UI: v6 milestone. If you're looking for a particular change, you can also search issues filtering by that milestone.
Promotions
The text was updated successfully, but these errors were encountered: