-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: add screenCap to cached props for diffing during render check #835
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #835 +/- ##
=======================================
Coverage 76.57% 76.57%
=======================================
Files 88 88
Lines 6994 6994
=======================================
Hits 5356 5356
Misses 1638 1638
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
height, | ||
width, | ||
imageUnderlay, | ||
screenCap, |
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.
just wanted to double check, screenCap
was coming from this.props
, but now we're getting it from asyncProps
. Is that intentional? Thanks!
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.
it's not necessary to get it from asyncProps here, both places are correct. The reason we're adding screenCap to watchProps is to piggyback on the prop caching.
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.
these files can all be deleted?
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 nvm, this is the new spatial dataset. Thanks for adding this, Seve!
@seve can you help putting down a description of the bug, so the reviewers have more context please? Thank you! |
@seve PTAL this approach! Would love to see what you think 🙏 Thank you! |
Co-authored-by: Timmy Huang <[email protected]>
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.
LGTM!! Thanks for the great fix, @seve 🚀 👏 !!
Added some checks to see if screenCap differs from last attempt to re-render before actually triggering re-render.
Also adds new spatial dataset to example-datasets
These changes prevent the image download flow from download multiple images when pressed a single time while the spatial feature flag is enabled
#823