-
Notifications
You must be signed in to change notification settings - Fork 180
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): finish logic for liquid class getter #18035
base: edge
Are you sure you want to change the base?
Conversation
This PR finishes the logic for retrieving liquid class values and unpacking them into a moveLiquid or mix step form. `updateFieldsForLiquidClass` directly updates the fields with values gotten from `getLiquidClassesValues`. This util also handles 'none' as the selected liquid class according to the form logic agreed upon by the liquid class project stakeholders. Also, I wire up the field updater in StepFormToolbox and in the advanced settings pages of both the moveLiquid and mix step forms. Closes AUTH-1655
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## edge #18035 +/- ##
===========================================
+ Coverage 24.40% 62.88% +38.47%
===========================================
Files 2973 2990 +17
Lines 229681 232859 +3178
Branches 19299 20459 +1160
===========================================
+ Hits 56060 146423 +90363
+ Misses 173609 86259 -87350
- Partials 12 177 +165
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…d and has seen advanced settings
prefix: string | ||
): Record<string, any> => { | ||
if (mix == null) { | ||
return {} |
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.
from the return type, this might be null
or remove null
from the return type since it isn't used?
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.
the mix object can be null if returned from multiDispense, so that's why the mix argument here is allowed to be null
: {}), | ||
// keep current tab form data if only updating one tab | ||
...(liquidHandlingAction === 'aspirate' | ||
? getCurrentFormFields(rawForm, Object.keys(dispenseFields)) |
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.
could you tell me why dispenseFields
is passed?
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.
The reason for this is because we want to keep the current dispense fields value if the liquid handling action is explicitly aspirate
(meaning, the user clicked "Reset aspirate settings" on the advanced settings toolbox aspirate tab
Overview
This PR finishes the logic for retrieving liquid class values and unpacking them into a moveLiquid or mix step form.
updateFieldsForLiquidClass
directly updates the fields with values gotten fromgetLiquidClassesValues
. This util also handles 'none' as the selected liquid class according to the form logic agreed upon by the liquid class project stakeholders. Also, I wire up the field updater in StepFormToolbox and in the advanced settings pages of both the moveLiquid and mix step forms.Closes AUTH-1655
Test Plan and Hands on Testing
I am working on a full set of tests for these utilities. In the meantime, the best way to test this is to create or edit a mix or transfer form. Change various fields that affect liquid class settings on pages 1 and 2 including:
Upon clicking "continue" on page 2 and updating values when prompted in the modal, you should be brought to a filled out advanced settings page. (NOTE: if you select "Don't use a liquid class," not all advanced settings will be filled out by design— reference "Conclusion for new form auto-fill" column of bottom table in this doc.)
Once on advanced settings, change some settings on aspirate or dispense tab. At the bottom of the page, click "reset aspirate/dispense settings" and confirm the modal. Verify that the values for only the selected tab were reset.
Changelog
Review requests
Risk assessment
low-medium