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(app): fix MoveInterventionModal labware begin location not updating properly #16307

Merged

Conversation

mjhuff
Copy link
Contributor

@mjhuff mjhuff commented Sep 19, 2024

Closes RQA-3216

Overview

When the app is polling, and there are two back-to-back manual move interventions, the labware start location doesn't update correctly due to the memoization of some of the content and the way rendering works in React. For some reason, this problem does not seem to occur consistently when the app is on notifications (but it does occur sometimes).

Looking back when this memoization logic was initially added (which was long before the InterventionModal partial refactor), I don't think we really need it anymore. If anything, this child content should be made into its own component at some point.

As to why different texts seem to render at different timings, I think that has to do with some of the utility functions themselves...revisiting these would be a good idea in the future.

Current Behavior

2024-09-19_14-14-55.mp4

Fixed Behavior

Screen.Recording.2024-09-19.at.3.59.17.PM.mov

Test Plan and Hands on Testing

  • Turn on polling in app settings > feature flags. This makes it easy to reproduce.
  • Run a protocol with back-to-back manual move commands (see ticket for protocol).
  • Validate the fix.

Changelog

  • Fixed the initial labware location sometimes not displaying the correct location when running back to back manual move labware commands.

Risk assessment

low

@mjhuff mjhuff requested a review from a team as a code owner September 19, 2024 20:13
Copy link
Contributor

@TamarZanzouri TamarZanzouri left a comment

Choose a reason for hiding this comment

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

code changes LGTM!

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

any time we can remove a memo it's worth it

@mjhuff mjhuff merged commit fd9ffe1 into chore_release-8.0.0 Sep 19, 2024
20 checks passed
@mjhuff mjhuff deleted the app_fix-intervention-modal-move-labware-start-loc branch September 19, 2024 20:43
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