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

feat(protocol-designer): return tip UI foundation #15823

Merged
merged 9 commits into from
Aug 1, 2024
Merged

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Jul 29, 2024

closes AUTH-580 AUTH-581 AUTH-582

Overview

Decided to tackle this since I wasn't quite sure how to make the UI (since design doesn't have bandwidth rn to add this feature) so i was messing around and figured i might as well open a PR.

What this PR does is

  • creates a ff
  • creates a few new fields: dropTipField is modified, pickUpTipField, and then the well selection input field for both.

Please note that there is no error handling and the new fields are not wired up in step-generation.

Test Plan and Hands on Testing

  • turn on the return tip ff
  • create a flex or ot-2 protocol
  • add 1 labware to the deck
  • create a transfer step and fill out the labware selections and wells.
  • see that the pick up tip and drop tip fields are now enabled. Pick up tip should default to "default - get next tip", drop tip should default to "trash bin".
  • See that when you select tipracks for both of them, the well selection fields are revealed. Click on each well selection field and see that it opens a modal that allows you to select a well and save. There is no error handling yet so it does not error or show a ration needed. we will wire this up later!
  • once you create the step, open dev tools and go to the redux tree. Navigate to stepForms -> savedStepForms -> click on the step after the initial deck setup -> navigate to the relevant fields which are pickUpTip_location, dropTip_location, pickUpTip_wellNames and dropTip_wellNames (note that you might need to expand the tree to see those keys!) See that they populate correctly with the locations showing the tiprack id and the wellnames showing a string[] of each well name
  • finally, repeat with a mix step. Your tiprack and well names should populate in the redux tree.

Changelog

  • create ff and put new work behind it
  • create new fields and wire them up to moveLiquid and mix
  • add new form data fields that are optional
  • add tests to each field
  • create a new selector for returning only tipracks selected
  • wire up the empty form for the fields
  • add a few dependent fields

Review requests

see test plan

Risk assessment

low, behind ff

@jerader jerader requested a review from a team as a code owner July 29, 2024 17:26
@jerader jerader requested review from koji, shlokamin and ncdiehl11 July 29, 2024 17:26
@jerader jerader removed the request for review from a team July 29, 2024 17:40
@jerader jerader requested a review from a team as a code owner July 29, 2024 17:42
migrationModal: null,
unusedPipettes: false,
},
// TODO(jr, 7/29/24): add these back when we create the 9_0_0 migration for the PD redesign
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

note: with this PR, importing protocols is a bit wonky because we don't auto-populate the new fields. But i guess since the new fields can be undefined there are no detrimental outcomes with importing.

@koji
Copy link
Contributor

koji commented Jul 29, 2024

liquid_selection.mov

@jerader
Copy link
Collaborator Author

jerader commented Jul 29, 2024

liquid_selection.mov

@koji thanks i think this is a bug. i guess youre running into this issue because the labware is incompatible with the pipette (since you are using an 8-channel with a tuberack). I guess we need to disable the well selection if that error comes up. I'll log the bug!

@@ -35,7 +35,10 @@ export function getDefaultsForStepType(
dispense_delay_seconds: `${DEFAULT_DELAY_SECONDS}`,
mix_touchTip_checkbox: false,
mix_touchTip_mmFromBottom: null,
pickUpTip_location: null,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@shlokamin can i pick your brain about this? so there are 3 new fields introduced with this pr: pickUpTip_location, pickUpTip_wellNames, dropTip_wellNames. Each of them are optional for the user to add so we can create the blank form with each of these values as undefined. That means that we don't break the import/export (which if we did, then we'd need a new migration and im unsure how we can put all of that behind a ff). But that does not follow the current pattern. All the other fields default to null or an empty array, etc. Is there harm in defaulting to undefined?

@jerader jerader force-pushed the pd_return-tip-visuals branch from 436b826 to 646a11e Compare July 30, 2024 17:46
@jerader jerader force-pushed the pd_return-tip-visuals branch from 1d8e9cd to 87b80b6 Compare July 31, 2024 13:15
@jerader jerader requested a review from koji July 31, 2024 14:18
Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

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

the changes look good to me.
the sandbox worked as expected.
there is one e2e test error on transferSettings.cy.js

@jerader
Copy link
Collaborator Author

jerader commented Aug 1, 2024

the changes look good to me. the sandbox worked as expected. there is one e2e test error on transferSettings.cy.js

@koji thanks! ya the transferSettings cypress test is really brittle - the check tends to fail randomly sometimes. I'll rerun it and it should work hopefully

@jerader jerader merged commit c976794 into edge Aug 1, 2024
22 checks passed
@jerader jerader deleted the pd_return-tip-visuals branch August 1, 2024 12:51
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