-
-
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
[lab] Drop usage of createStyles #24158
Conversation
d8d40f9
to
d0d5637
Compare
8bd5543
to
68dee8d
Compare
Want to get #24188 in first before we rebase and merge this PR. |
Co-authored-by: Olivier Tassinari <[email protected]>
dfb5c3b
to
3131868
Compare
The inline styles declaration is huge and not really what we want. |
- not docoumented - not tested - not typed in /core
cd82a1d
to
250e8fa
Compare
250e8fa
to
8923918
Compare
| 'pmButton' | ||
| 'meridiemButtonSelected'; | ||
|
||
export const styles: MuiStyles<ClockClassKey> = (theme): StyleRules<ClockClassKey> => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might seem like duplication but leads to better locations of type errors of classes or not implemented or not declared (compared to only using MuiStyles
; just using Theme => StyleRules
would not allow us to switch back to theme-less styles).
Continuing #24132
Fixing symptoms of microsoft/TypeScript#42155
Should be reviewed while whitespace changes are hidden.
createStyles
(proof of concept: https://app.circleci.com/pipelines/github/mui-org/material-ui/30857/workflows/a296b04d-92ac-4037-b22f-6c67b1667390/jobs/207735)MuiStyles
+StyleRules
for best autocomplete + error locations)Diff of fixed inlined types (expires in 24h): https://www.diffchecker.com/SvdD2VuZ
Diff of generated declaration files: https://app.circleci.com/pipelines/github/mui-org/material-ui/31365/workflows/15c5b765-fa4b-4ff9-9ab5-c92f01c7cd60/jobs/209329/parallel-runs/0/steps/0-110
Part of #24112
Closes #24132
Will dropHaving worked with styles and types a bit more:createStyles
in a future PR for visibility. See #20012 (comment)createStyles
is super helpful with regards to autocomplete. Will not drop.