-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
[core] Add createMuiStrictModeTheme #20523
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0762f98
[docs] Fix heading fragment id mismatch
eps1lon dbcc5ae
[docs] Use reactStrictMode over custom switch
eps1lon ff01e5c
Add StrictMode compatible transition implementations
eps1lon 55afd82
revert: use stable legacy mode
eps1lon 82f323b
Revert "[docs] Fix heading fragment id mismatch"
eps1lon f43ffe2
[docs] Use StrictMode compatible transitions
eps1lon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -34,11 +34,13 @@ const Backdrop = React.forwardRef(function Backdrop(props, ref) { | |
| invisible = false, | ||
| open, | ||
| transitionDuration, | ||
| // eslint-disable-next-line react/prop-types | ||
| TransitionComponent = Fade, | ||
| ...other | ||
| } = props; | ||
|
|
||
| return ( | ||
| <Fade in={open} timeout={transitionDuration} {...other}> | ||
| <TransitionComponent in={open} timeout={transitionDuration} {...other}> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, I had forgotten about this one in #17047 (comment). |
||
| <div | ||
| data-mui-test="Backdrop" | ||
| className={clsx( | ||
|
|
@@ -53,7 +55,7 @@ const Backdrop = React.forwardRef(function Backdrop(props, ref) { | |
| > | ||
| {children} | ||
| </div> | ||
| </Fade> | ||
| </TransitionComponent> | ||
| ); | ||
| }); | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import * as React from 'react'; | ||
| import { Transition } from '@material-ui/react-transition-group'; | ||
| import { useForkRef } from '../utils'; | ||
| import Collapse from './Collapse'; | ||
|
|
||
| /** | ||
| * @ignore - internal component. | ||
| */ | ||
| const StrictModeCollapse = React.forwardRef(function StrictModeCollapse(props, forwardedRef) { | ||
| const domRef = React.useRef(null); | ||
| const ref = useForkRef(domRef, forwardedRef); | ||
|
|
||
| return ( | ||
| <Collapse | ||
| {...props} | ||
| findDOMNode={() => domRef.current} | ||
| ref={ref} | ||
| TransitionComponent={Transition} | ||
| /> | ||
| ); | ||
| }); | ||
|
|
||
| export default StrictModeCollapse; |
This file contains hidden or 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,2 @@ | ||
| export { default } from './Collapse'; | ||
| export { default, default as unstable_StrictModeCollapse } from './Collapse'; | ||
| export * from './Collapse'; |
This file contains hidden or 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,3 @@ | ||
| export { default } from './Collapse'; | ||
| // eslint-disable-next-line camelcase | ||
| export { default as unstable_StrictModeCollapse } from './StrictModeCollapse'; |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import * as React from 'react'; | ||
| import { Transition } from '@material-ui/react-transition-group'; | ||
| import { useForkRef } from '../utils'; | ||
| import Fade from './Fade'; | ||
|
|
||
| /** | ||
| * @ignore - internal component. | ||
| */ | ||
| const StrictModeFade = React.forwardRef(function StrictModeFade(props, forwardedRef) { | ||
| const domRef = React.useRef(null); | ||
| const ref = useForkRef(domRef, forwardedRef); | ||
|
|
||
| return ( | ||
| <Fade | ||
| {...props} | ||
| findDOMNode={() => domRef.current} | ||
| ref={ref} | ||
| TransitionComponent={Transition} | ||
| /> | ||
| ); | ||
| }); | ||
|
|
||
| export default StrictModeFade; |
This file contains hidden or 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,2 @@ | ||
| export { default } from './Fade'; | ||
| export { default, default as unstable_StrictModeFade } from './Fade'; | ||
| export * from './Fade'; |
This file contains hidden or 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,3 @@ | ||
| export { default } from './Fade'; | ||
| // eslint-disable-next-line camelcase | ||
| export { default as unstable_StrictModeFade } from './StrictModeFade'; |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import * as React from 'react'; | ||
| import { Transition } from '@material-ui/react-transition-group'; | ||
| import { useForkRef } from '../utils'; | ||
| import Grow from './Grow'; | ||
|
|
||
| /** | ||
| * @ignore - internal component. | ||
| */ | ||
| const StrictModeGrow = React.forwardRef(function StrictModeGrow(props, forwardedRef) { | ||
| const domRef = React.useRef(null); | ||
| const ref = useForkRef(domRef, forwardedRef); | ||
|
|
||
| return ( | ||
| <Grow | ||
| {...props} | ||
| findDOMNode={() => domRef.current} | ||
| ref={ref} | ||
| TransitionComponent={Transition} | ||
| /> | ||
| ); | ||
| }); | ||
|
|
||
| export default StrictModeGrow; |
This file contains hidden or 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,2 @@ | ||
| export { default } from './Grow'; | ||
| export { default, default as unstable_StrictModeGrow } from './Grow'; | ||
| export * from './Grow'; |
This file contains hidden or 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,3 @@ | ||
| export { default } from './Grow'; | ||
| // eslint-disable-next-line camelcase | ||
| export { default as unstable_StrictModeGrow } from './StrictModeGrow'; |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import * as React from 'react'; | ||
| import { Transition } from '@material-ui/react-transition-group'; | ||
| import { useForkRef } from '../utils'; | ||
| import Slide from './Slide'; | ||
|
|
||
| /** | ||
| * @ignore - internal component. | ||
| */ | ||
| const StrictModeSlide = React.forwardRef(function StrictModeSlide(props, forwardedRef) { | ||
| const domRef = React.useRef(null); | ||
| const ref = useForkRef(domRef, forwardedRef); | ||
|
|
||
| return ( | ||
| <Slide | ||
| {...props} | ||
| findDOMNode={() => domRef.current} | ||
| ref={ref} | ||
| TransitionComponent={Transition} | ||
| /> | ||
| ); | ||
| }); | ||
|
|
||
| export default StrictModeSlide; |
This file contains hidden or 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,2 @@ | ||
| export { default } from './Slide'; | ||
| export { default, default as unstable_StrictModeSlide } from './Slide'; | ||
| export * from './Slide'; |
This file contains hidden or 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,3 @@ | ||
| export { default } from './Slide'; | ||
| // eslint-disable-next-line camelcase | ||
| export { default as unstable_StrictModeSlide } from './StrictModeSlide'; |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import * as React from 'react'; | ||
| import { Transition } from '@material-ui/react-transition-group'; | ||
| import { useForkRef } from '../utils'; | ||
| import Zoom from './Zoom'; | ||
|
|
||
| /** | ||
| * @ignore - internal component. | ||
| */ | ||
| const StrictModeZoom = React.forwardRef(function StrictModeZoom(props, forwardedRef) { | ||
| const domRef = React.useRef(null); | ||
| const ref = useForkRef(domRef, forwardedRef); | ||
|
|
||
| return ( | ||
| <Zoom | ||
| {...props} | ||
| findDOMNode={() => domRef.current} | ||
| ref={ref} | ||
| TransitionComponent={Transition} | ||
| /> | ||
| ); | ||
| }); | ||
|
|
||
| export default StrictModeZoom; |
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.
Uh oh!
There was an error while loading. Please reload this page.