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

fix: add screenCap to cached props for diffing during render check #835

Merged
merged 4 commits into from
Mar 19, 2024

Conversation

seve
Copy link
Contributor

@seve seve commented Mar 18, 2024

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

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.57%. Comparing base (7e0f1f0) to head (dde1757).

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           
Flag Coverage Δ
frontend 76.57% <ø> (ø)
javascript 76.57% <ø> (ø)
smokeTest ∅ <ø> (∅)
unitTest 76.57% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@seve seve requested review from kaloster and tihuan March 18, 2024 20:34
@seve seve linked an issue Mar 18, 2024 that may be closed by this pull request
height,
width,
imageUnderlay,
screenCap,
Copy link
Contributor

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!

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

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!

@tihuan
Copy link
Contributor

tihuan commented Mar 18, 2024

@seve can you help putting down a description of the bug, so the reviewers have more context please? Thank you!

@tihuan
Copy link
Contributor

tihuan commented Mar 18, 2024

@seve PTAL this approach! Would love to see what you think 🙏

https://github.com/chanzuckerberg/single-cell-explorer/compare/thuang-fix-double-download?expand=1

Thank you!

Copy link
Contributor

@tihuan tihuan left a 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 🚀 👏 !!

@seve seve enabled auto-merge (squash) March 19, 2024 20:47
@seve seve merged commit 056704f into main Mar 19, 2024
7 checks passed
@seve seve deleted the seve/fix-download branch March 19, 2024 20:51
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.

Export image downloads twice
2 participants