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

Only clear interventions on Intervention unmount #5349

Merged
merged 3 commits into from
May 21, 2019

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented May 21, 2019

Staging branch URL: https://pr-5349.pfe-preview.zooniverse.org

Expect that the Intervention component will not call props.unMount on props change. Update useEffect to pass that test.

Required Manual Testing

  • Does the non-logged in home page render correctly?
  • Does the logged in home page render correctly?
  • Does the projects page render correctly?
  • Can you load project home pages?
  • Can you load the classification page?
  • Can you submit a classification?
  • Does talk load correctly?
  • Can you post a talk comment?

Review Checklist

  • Does it work in all major browsers: Firefox, Chrome, Edge, Safari?
  • Does it work on mobile?
  • Can you rm -rf node_modules/ && npm install and app works as expected?
  • If the component is in coffeescript, is it converted to ES6? Is it free of eslint errors? Is the conversion its own commit?
  • Are the tests passing locally and on Travis?

Optional

Ignore prop changes in useEffect, so that cleanup only runs when the Intervention component unmounts.
Expect that the current message will not be cleared on props change.
@coveralls
Copy link

coveralls commented May 21, 2019

Coverage Status

Coverage remained the same at 48.991% when pulling 4da31db on intervention-unmount into cf78fab on master.

Copy link
Contributor

@camallen camallen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - tested locally and I don't get crashes anymore

@eatyourgreens
Copy link
Contributor Author

I'm ambivalent about the comment duplicating the Hooks documentation, which is still new-ish and might change. Can't hurt though.

@eatyourgreens eatyourgreens merged commit 5d52781 into master May 21, 2019
@eatyourgreens eatyourgreens deleted the intervention-unmount branch May 21, 2019 12:36
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.

3 participants