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

Reduce Comparison "Image By Step" calls to backend #4506

Merged
merged 3 commits into from
Aug 16, 2023

Conversation

julieg18
Copy link
Contributor

@julieg18 julieg18 commented Aug 15, 2023

  • stops our comparison multi image from making unneeded calls to the backend on mount

@@ -30,7 +30,10 @@ export const ComparisonTableMultiCell: React.FC<{
useEffect(() => {
window.clearTimeout(changeDebounceTimer.current)
changeDebounceTimer.current = window.setTimeout(() => {
if (currentStep === values?.[plot.id]?.[path]) {
const isOnMount =
values?.[plot.id]?.[path] === undefined && currentStep === 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Saw that our windows tests were sometimes failing with:

Screenshot 2023-08-15 at 7 57 34 AM

which made me realize that we were sending unneeded calls on mount.

@julieg18 julieg18 marked this pull request as ready for review August 15, 2023 13:26
@mattseddon mattseddon enabled auto-merge (squash) August 16, 2023 01:54
@codeclimate
Copy link

codeclimate bot commented Aug 16, 2023

Code Climate has analyzed commit a0b3538 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (85% is the threshold).

This pull request will bring the total coverage in the repository to 95.2% (0.0% change).

View more on Code Climate.

@mattseddon mattseddon merged commit 1a243b6 into main Aug 16, 2023
3 checks passed
@mattseddon mattseddon deleted the reduce-comparison-multi-img-calls branch August 16, 2023 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants