-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
[muiStyled] Support default theme when none is available #22791
Merged
Merged
Changes from 28 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
c2d31cc
add emotion peer dependencies
mnajdova 5ae933f
fixed types & tests
mnajdova 18b0668
prettier
mnajdova f0ef95c
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova c7bebb8
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova 92b2d6e
Merge branch 'next' of https://github.com/mui-org/material-ui into next
mnajdova 76256f1
wip
mnajdova 8661306
added ThemeProvider
mnajdova 61d7fac
exported ThemeProvider from styled-engine-sc
mnajdova c9fcdc1
tests wip
mnajdova 48305e9
tests
mnajdova 1c04d40
prettier
mnajdova 27d9f73
Update packages/material-ui/src/styles/muiStyled.d.ts
mnajdova b149da5
Update packages/material-ui/src/styles/customStyled.d.ts
mnajdova 05217a7
renamed styled -> legacy_styled, renamed customStyled -> styled
mnajdova 3bf96aa
fixed tests
mnajdova 551157f
added migration step, exported styled with deprecation warning
mnajdova a03252c
prettier
mnajdova 179a6e2
renamed legacy_styled back to styled
mnajdova 9878176
renamed styled to experimentalStyled
mnajdova 17ce5d4
fix
mnajdova b7ccb20
specify ThemeProvider as export from emotion-theming
mnajdova 72398c8
refactored muiStyled to be used as simple styled utility too
mnajdova 58a1fb9
fix lint issues
mnajdova aac9e83
renamed muiStyled to experimentalStyled
mnajdova 5774c19
refactored to use ThemeContext
mnajdova 8016f92
Update packages/material-ui-styles/README.md
mnajdova 6bc05c1
Update packages/material-ui-styles/README.md
mnajdova 9757a00
Update packages/material-ui-styles/package.json
mnajdova bb880fe
Moved nesting ThemeProvider to core
mnajdova 73d6589
Update packages/material-ui/src/styles/experimentalStyled.d.ts
mnajdova 6e2b480
Update packages/material-ui/src/styles/experimentalStyled.d.ts
mnajdova 0c8be58
added test
mnajdova a001588
fixed docs generation
mnajdova e676780
Update packages/material-ui/src/styles/ThemeProvider.js
mnajdova 0298222
Update packages/material-ui/src/styles/experimentalStyled.d.ts
mnajdova c96062d
addressed comments
mnajdova 3e419ac
Update packages/material-ui/src/styles/ThemeProvider.js
mnajdova 4fccc26
Update packages/material-ui/src/styles/ThemeProvider.js
mnajdova dcc97fa
docs:api
mnajdova File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from '@emotion/styled'; | ||
export { default } from '@emotion/styled'; | ||
export { ThemeContext } from '@emotion/core'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export { default } from '@emotion/styled'; | ||
export { ThemeContext } from '@emotion/core'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Does the styles package really need these new dependencies? I was under the assumption that we would try not to interfer with it, progressively making it legacy, and dropping it.
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.
The only reason there were added is because the
ThemeProvider
is in this package. Once we move it out of the package we can drop these dependenciesThere 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.
We only document the import of
ThemeProvider
from the core. Would it work if we moved the theme provider nesting to the core?My concern is about the migration experience for v4 developers that are using JSS. We could imagine having developers migrate their v4 imports from
@material-ui/core/styles
to@material-ui/styles
and have still everything working. We could no longer have @material-ui/styles as a dependency in @material-ui/core. Would that work? Do you have an alternative story in mind? A migration from@material-ui/core/styles
to react-jss won't be as smooth.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.
Ah I see what is the concern. Let me try then to migrate the nesting to the core 👍
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.
Done 👍