-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Visibility: an update after component's unmount throws exception #2571
Conversation
💖 Thanks for opening this pull request! 💖 Here is a list of things that will help get it across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Codecov Report
@@ Coverage Diff @@
## master #2571 +/- ##
=======================================
Coverage 99.74% 99.74%
=======================================
Files 160 160
Lines 2744 2744
=======================================
Hits 2737 2737
Misses 7 7 Continue to review full report at Codecov.
|
To team: don't merge this, the problem is in suddenly unmounted Visibility component and should be fixed there. |
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.
@layershifter Can you take a look here?
@@ -69,7 +69,7 @@ class DesktopContainer extends Component { | |||
const { fixed } = this.state | |||
|
|||
return ( | |||
<Responsive {...Responsive.onlyComputer}> | |||
<Responsive {...Responsive.onlyComputer} minWidth={768}> |
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.
I'm not sure on this. The props being spread in Responsive.onlyComputer
include a minWidth of 992. Why is is that we need to override this to 768?
static onlyComputer = { minWidth: 992 } |
If 768 is indeed correct, then we should not be spreading the other value and then overridding it.
@@ -114,7 +114,7 @@ class MobileContainer extends Component { | |||
const { sidebarOpened } = this.state | |||
|
|||
return ( | |||
<Responsive {...Responsive.onlyMobile}> | |||
<Responsive {...Responsive.onlyMobile} minWidth={0}> |
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 one also is specifically spreading a different value for minWidth. Why is it that we need to override this to 0?
static onlyMobile = { minWidth: 320, maxWidth: 767 } |
As above, if minWidth 0 is correct then we should not be spreading onlyMobile
here, or, we need to update the values of onlyMobile
.
See #2635 for details. |
The responsiveness on your doc page was broken and wasn't considering devices other than mobile and desktop.
Fixes #2570