[theme] Rename createMuiTheme to createTheme#25992
Conversation
This is for v4. I believe it's no longer relevant anymore cc @eps1lon. It looks like another breaking change we should do. |
Let's keep it for now since there are more StrictMode changes coming in React core. We can make it a no-op though or rather just an alias for |
29c2fb6 to
1d69eb5
Compare
Actually, should we do the same with |
I would rename it, but keeping |
| ```tsx | ||
| import '@material-ui/lab/themeAugmentation'; | ||
|
|
||
| const theme = createMuiTheme({ |
There was a problem hiding this comment.
I don't think we are supposed to do changes to the translated files. @oliviertassinari ?
There was a problem hiding this comment.
It's best to avoid it as it add noises in the pull requests. But since this one is already very noisy, no strong preferences.
packages/material-ui/test/umd/run.js
Outdated
| @@ -47,7 +47,7 @@ async function createApp() { | |||
|
|
|||
| let index = await fse.readFile(path.join(rootPath, 'examples/cdn/index.html'), 'utf8'); | |||
| index = index.replace( | |||
| 'https://unpkg.com/@material-ui/core@latest/umd/material-ui.development.js', | |||
| 'https://unpkg.com/@material-ui/core@next/umd/material-ui.development.js', | |||
There was a problem hiding this comment.
The replace was doing nothing, because the path in examples/cdn/index.html uses the next tag. Since I had removed createMuiTheme it broke the e2e tests. Now that we have createMuiTheme back it could be reverted, or we leave it but once v5 becomes stable we have to update it back to latest.
There was a problem hiding this comment.
Got it, thanks! Let’s leave it I’d say
There was a problem hiding this comment.
I would personally keep latest so we don't forget to update it.
On this CDN aspect, I was also eager to replace/complement this example with something more modern https://trello.com/c/8QGmlDLH
mnajdova
left a comment
There was a problem hiding this comment.
I've scanned all files, this is the only non related change I could spot - #25992 (comment) I am going to create lots of conflicts with the PRs that removes the @material-ui/styles utils from core, so I'd say it's better if we can merge this soon :)
This reverts commit 1d69eb5.
|
I am merging this one, not keep on resolving merge conflicts in 100+ files :D |
* migrate to emotion * make styleProps optional * remove lint and add fn name * use yearButton from styles * revert types * [docs] Document all the colors available (#26015) * [Timeline] Add support for position override on items (#25974) * [core] Remove deprecated innerRef prop (#26028) [core] Remove deprecated innerRef prop (#26028) * [theme] Rename `createMuiTheme` to `createTheme` (#25992) * [pickers] Remove redundant aria-hidden (#26014) * [internal][pickers] Remove unused styles (#26023) * [pickers] Toggle mobile keyboard view in the same commit as the view changes (#26017) * [DateRangePicker] Fix not being opened on click (#26016) * Inline classes * type -> interface * sort asc * default props are private * remove uneccesary type casting * follow convention * trigger pipeline Co-authored-by: Anshuman Pandey <54475686+anshuman9999@users.noreply.github.com> Co-authored-by: simonecervini <69400730+simonecervini@users.noreply.github.com> Co-authored-by: Matheus Wichman <matheushw@outlook.com> Co-authored-by: Sebastian Silbermann <silbermann.sebastian@gmail.com> Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Depreciations
Developers only need one theme in their application. A prefix would suggest a second theme is needed. It's not the case.
createMuiThemewill be removed in v6.Part of #20012.
Sorry for the huge PR. 😅 I did a search & replace for
createMuiThemeignoring everything from the blog, CHANGELOG and migration guides of previous versions. I didn't rename variables names:muiTheme->theme.Should we rename
unstable_createMuiStrictModeTheme?