Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

VikVelev
Copy link

@VikVelev VikVelev commented Feb 25, 2018

The responsiveness on your doc page was broken and wasn't considering devices other than mobile and desktop.

Fixes #2570

@welcome
Copy link

welcome bot commented Feb 25, 2018

💖 Thanks for opening this pull request! 💖

Here is a list of things that will help get it across the finish line:

  • Run yarn lint locally to catch formatting errors. This will fix some errors automatically, commit and push any changes.
  • Run yarn test locally to catch errors. This ensures all components still behave as they should.
  • Run yarn start to run the doc site locally and try a few pages, ensuring everything is in good working order.
  • Include tests when adding/changing behavior.

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-io
Copy link

Codecov Report

Merging #2571 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1a2db8...f38c2c5. Read the comment docs.

@layershifter
Copy link
Member

layershifter commented Feb 25, 2018

To team: don't merge this, the problem is in suddenly unmounted Visibility component and should be fixed there.

Copy link
Member

@levithomason levithomason left a 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}>
Copy link
Member

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}>
Copy link
Member

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.

@layershifter layershifter changed the title Fixed HomepageLayout.js responsiveness Visibility: an update after component's unmount throws exception Mar 11, 2018
@layershifter layershifter removed the bug label Mar 11, 2018
@layershifter
Copy link
Member

See #2635 for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants