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

[core] v6 emotion-less css & styled prototype #44247

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

romgrk
Copy link
Contributor

@romgrk romgrk commented Oct 29, 2024

Prototype for emotion-less styling.

DataGrid PR: mui/mui-x#15160

@romgrk romgrk added the core Infrastructure work going on behind the scenes label Oct 29, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 29, 2024
Comment on lines +264 to +275
const resolvedStyleOverrides = {};

// TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly
// eslint-disable-next-line guard-for-in
for (const slotKey in styleOverrides) {
resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]);
}

return overridesResolver(props, resolvedStyleOverrides);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@siriwatknp Sidenote but this is part of what can be optimized, right now the whole styleOverrides is re-processed each render for each slot, even if overridesResolver only selects a small slice on the styleOverrides. It should be stable as long as theme is stable, so we should be able to pre-serialize & memo this. Same for theme variants.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 30, 2024
@mui-bot
Copy link

mui-bot commented Oct 30, 2024

Netlify deploy preview

https://deploy-preview-44247--material-ui.netlify.app/

createStyled: parsed: +4.65% , gzip: +3.44%
@material-ui/system: parsed: +2.30% , gzip: +1.39%
@material-ui/core: parsed: +0.31% , gzip: +0.37%
@mui/joy: parsed: +0.36% , gzip: +0.46%
ListItemText: parsed: +2.22% , gzip: +2.08%
CardHeader: parsed: +2.22% , gzip: +2.06%
Hidden: parsed: +2.22% , gzip: +2.01%
@mui/joy/Card: parsed: +2.08% , gzip: +2.14%
DialogTitle: parsed: +2.26% , gzip: +2.02%
InputAdornment: parsed: +2.22% , gzip: +1.99%
@mui/joy/Sheet: parsed: +2.12% , gzip: +2.13%
Typography: parsed: +2.28% , gzip: +2.03%
Grid: parsed: +2.20% , gzip: +1.95%
@mui/joy/Avatar: parsed: +2.40% , gzip: +2.13%
@mui/joy/Skeleton: parsed: +2.30% , gzip: +2.07%
SpeedDialAction: parsed: +1.23% , gzip: +1.11%
@mui/joy/Link: parsed: +2.30% , gzip: +2.05%
@material-ui/lab: parsed: +0.56% , gzip: +0.58%
@mui/joy/AccordionSummary: parsed: +2.21% , gzip: +1.97%
@mui/joy/Typography: parsed: +2.47% , gzip: +2.14%
and 180 more changes

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against b730b30

@romgrk romgrk changed the title [core] emotion-less css & styled prototype [core] v6 emotion-less css & styled prototype Oct 30, 2024
@romgrk romgrk marked this pull request as ready for review October 30, 2024 09:55
@romgrk romgrk requested a review from a team October 30, 2024 10:01
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Nov 4, 2024
@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged and removed PR: out-of-date The pull request has merge conflicts and can't be merged labels Nov 28, 2024
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 2, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants