Skip to content

Commit c6f5f64

Browse files
committed
address feedback
1 parent e70cb18 commit c6f5f64

File tree

14 files changed

+87
-95
lines changed

14 files changed

+87
-95
lines changed

app/src/assets/localization/en/quick_transfer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
"touch_tip_position_mm": "Touch tip position from top of well (mm)",
136136
"touch_tip_value": "{{position}} mm from bottom",
137137
"use_deck_slots": "<block>Quick transfers use deck slots B2-D2. These slots hold a tip rack, a source labware, and a destination labware.</block><block>Make sure that your deck configuration is up to date to avoid collisions.</block>",
138-
"value_out_of_range": "Value must be between {{min}}-{{max}}",
138+
"value_out_of_range": "Value must be between {{min}} to {{max}}",
139139
"too_many_pins_body": "Remove a quick transfer in order to add more transfers to your pinned list.",
140140
"too_many_pins_header": "You've hit your max!",
141141
"transfer_analysis_failed": "quick transfer analysis failed",

app/src/organisms/ODD/QuickTransferFlow/__tests__/QuickTransferAdvancedSettings/TouchTip.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ describe('TouchTip', () => {
145145
expect(vi.mocked(InputField)).toHaveBeenCalledWith(
146146
{
147147
title: 'Touch tip position from top of well (mm)',
148-
error: 'Value must be between -25-0',
148+
error: 'Value must be between -25 to 0',
149149
readOnly: true,
150150
type: 'number',
151151
value: -98,
@@ -171,7 +171,7 @@ describe('TouchTip', () => {
171171
expect(vi.mocked(InputField)).toHaveBeenCalledWith(
172172
{
173173
title: 'Touch tip position from top of well (mm)',
174-
error: 'Value must be between -100-0',
174+
error: 'Value must be between -100 to 0',
175175
readOnly: true,
176176
type: 'number',
177177
value: 1,

protocol-designer/src/organisms/TipPositionModal/utils.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,18 @@ export function getDefaultMmFromEdge(args: { name: StepFieldName }): number {
1212
const { name } = args
1313

1414
switch (name) {
15-
case 'aspirate_mmFromBottom':
16-
return DEFAULT_MM_OFFSET_FROM_BOTTOM
17-
18-
case 'aspirate_delay_mmFromBottom':
19-
return DEFAULT_MM_OFFSET_FROM_BOTTOM
20-
15+
case 'mix_mmFromBottom':
2116
case 'dispense_mmFromBottom':
22-
return DEFAULT_MM_OFFSET_FROM_BOTTOM
23-
2417
case 'dispense_delay_mmFromBottom':
25-
return DEFAULT_MM_OFFSET_FROM_BOTTOM
26-
27-
case 'mix_mmFromBottom':
18+
case 'aspirate_delay_mmFromBottom':
19+
case 'aspirate_mmFromBottom':
2820
return DEFAULT_MM_OFFSET_FROM_BOTTOM
2921

3022
default:
3123
// touch tip fields
3224
console.assert(
3325
getIsTouchTipField(name),
34-
`getDefaultMmFromBottom fn does not know what to do with field ${name}`
26+
`getDefaultMmFromEdge fn does not know what to do with field ${name}`
3527
)
3628
return DEFAULT_MM_TOUCH_TIP_OFFSET_FROM_TOP
3729
}

protocol-designer/src/steplist/formLevel/stepFormToArgs/mixFormToArgs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const mixFormToArgs = (
3838
)
3939
const touchTip = Boolean(hydratedFormData.mix_touchTip_checkbox)
4040
const touchTipMmFromTop =
41-
hydratedFormData.mix_touchTip_mmFromTop ||
41+
hydratedFormData.mix_touchTip_mmFromTop ??
4242
DEFAULT_MM_TOUCH_TIP_OFFSET_FROM_TOP
4343
const volume = hydratedFormData.volume || 0
4444
const times = hydratedFormData.times || 0

protocol-designer/src/steplist/formLevel/stepFormToArgs/moveLiquidFormToArgs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,13 @@ export const moveLiquidFormToArgs = (
128128
hydratedFormData.aspirate_touchTip_checkbox
129129
)
130130
const touchTipAfterAspirateOffsetMmFromTop =
131-
hydratedFormData.aspirate_touchTip_mmFromTop ||
131+
hydratedFormData.aspirate_touchTip_mmFromTop ??
132132
DEFAULT_MM_TOUCH_TIP_OFFSET_FROM_TOP
133133
const touchTipAfterDispense = Boolean(
134134
hydratedFormData.dispense_touchTip_checkbox
135135
)
136136
const touchTipAfterDispenseOffsetMmFromTop =
137-
hydratedFormData.dispense_touchTip_mmFromTop ||
137+
hydratedFormData.dispense_touchTip_mmFromTop ??
138138
DEFAULT_MM_TOUCH_TIP_OFFSET_FROM_TOP
139139
const mixBeforeAspirate = getMixData(
140140
hydratedFormData,

protocol-designer/src/steplist/formLevel/stepFormToArgs/test/moveLiquidFormToArgs.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ describe('move liquid step form -> command creator args', () => {
189189
},
190190
{
191191
checkboxField: 'dispense_touchTip_checkbox',
192-
formFields: { dispense_touchTip_mmFromTop: -42 },
192+
formFields: { dispense_touchTip_mmFromTop: -22 },
193193
expectedArgsUnchecked: {
194194
touchTipAfterDispense: false,
195-
touchTipAfterDispenseOffsetMmFromTop: -42,
195+
touchTipAfterDispenseOffsetMmFromTop: -22,
196196
},
197197
expectedArgsChecked: {
198198
touchTipAfterDispense: true,
199-
touchTipAfterDispenseOffsetMmFromTop: -42,
199+
touchTipAfterDispenseOffsetMmFromTop: -22,
200200
},
201201
},
202202
// MIXES

protocol-designer/src/steplist/test/generateSubsteps.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ describe('generateSubstepItem', () => {
364364
volume: 50,
365365
times: 2,
366366
touchTip: false,
367-
touchTipMmFromTop: 5,
367+
touchTipMmFromTop: -5,
368368
changeTip: 'always',
369369
blowoutLocation: null,
370370
blowoutFlowRateUlSec: 3,

protocol-designer/src/timelineMiddleware/__tests__/generateRobotStateTimeline.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ describe('generateRobotStateTimeline', () => {
4040
dispenseAirGapVolume: null,
4141
mixInDestination: null,
4242
touchTipAfterAspirate: false,
43-
touchTipAfterAspirateOffsetMmFromTop: 13.81,
43+
touchTipAfterAspirateOffsetMmFromTop: -13.81,
4444
touchTipAfterDispense: false,
45-
touchTipAfterDispenseOffsetMmFromTop: 13.81,
45+
touchTipAfterDispenseOffsetMmFromTop: -13.81,
4646
name: 'transfer',
4747
commandCreatorFnName: 'transfer',
4848
blowoutLocation: null,
@@ -80,9 +80,9 @@ describe('generateRobotStateTimeline', () => {
8080
dispenseAirGapVolume: null,
8181
mixInDestination: null,
8282
touchTipAfterAspirate: false,
83-
touchTipAfterAspirateOffsetMmFromTop: 13.81,
83+
touchTipAfterAspirateOffsetMmFromTop: -13.81,
8484
touchTipAfterDispense: false,
85-
touchTipAfterDispenseOffsetMmFromTop: 13.81,
85+
touchTipAfterDispenseOffsetMmFromTop: -13.81,
8686
name: 'transfer',
8787
commandCreatorFnName: 'transfer',
8888
blowoutLocation: null,
@@ -110,7 +110,7 @@ describe('generateRobotStateTimeline', () => {
110110
volume: 5,
111111
times: 2,
112112
touchTip: false,
113-
touchTipMmFromTop: 13.81,
113+
touchTipMmFromTop: -13.81,
114114
changeTip: 'always',
115115
blowoutLocation: null,
116116
pipette: DEFAULT_PIPETTE,

protocol-designer/src/ui/steps/__fixtures__/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export const getMockMoveLiquidStep = (): SavedStepFormState => ({
1616
aspirate_mix_volume: '5',
1717
aspirate_mmFromBottom: 1,
1818
aspirate_touchTip_checkbox: true,
19-
aspirate_touchTip_mmFromTop: 1,
19+
aspirate_touchTip_mmFromTop: -1,
2020
dispense_flowRate: null,
2121
dispense_labware: 'dispense_labware_id',
2222
dispense_wells: ['A1'],
@@ -27,7 +27,7 @@ export const getMockMoveLiquidStep = (): SavedStepFormState => ({
2727
dispense_mix_volume: null,
2828
dispense_mmFromBottom: 0.5,
2929
dispense_touchTip_checkbox: true,
30-
dispense_touchTip_mmFromTop: 1,
30+
dispense_touchTip_mmFromTop: -1,
3131
disposalVolume_checkbox: true,
3232
disposalVolume_volume: '20',
3333
blowout_checkbox: true,

protocol-designer/src/ui/steps/test/selectors.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ describe('_getSavedMultiSelectFieldValues', () => {
509509
isIndeterminate: false,
510510
},
511511
aspirate_touchTip_mmFromTop: {
512-
value: 1,
512+
value: -1,
513513
isIndeterminate: false,
514514
},
515515
// dispense settings
@@ -570,7 +570,7 @@ describe('_getSavedMultiSelectFieldValues', () => {
570570
isIndeterminate: false,
571571
},
572572
dispense_touchTip_mmFromTop: {
573-
value: 1,
573+
value: -1,
574574
isIndeterminate: false,
575575
},
576576
blowout_checkbox: {
@@ -760,7 +760,7 @@ describe('_getSavedMultiSelectFieldValues', () => {
760760
},
761761
aspirate_touchTip_mmFromTop: {
762762
isIndeterminate: false,
763-
value: 1,
763+
value: -1,
764764
},
765765
// dispense settings
766766
dispense_labware: {
@@ -812,7 +812,7 @@ describe('_getSavedMultiSelectFieldValues', () => {
812812
},
813813
dispense_touchTip_mmFromTop: {
814814
isIndeterminate: false,
815-
value: 1,
815+
value: -1,
816816
},
817817
blowout_checkbox: {
818818
isIndeterminate: true,
@@ -974,7 +974,7 @@ describe('_getSavedMultiSelectFieldValues', () => {
974974
dispense_delay_checkbox: true,
975975
dispense_delay_seconds: '3',
976976
mix_touchTip_checkbox: true,
977-
mix_touchTip_mmFromTop: '14',
977+
mix_touchTip_mmFromTop: '-14',
978978
nozzles: null,
979979
},
980980
}

step-generation/src/__tests__/consolidate.test.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ describe('consolidate single-channel', () => {
10801080
preWetTip: true,
10811081
aspirateDelay: { seconds: 11, mmFromBottom: 15 },
10821082
touchTipAfterAspirate: true,
1083-
touchTipAfterAspirateOffsetMmFromTop: 14.5,
1083+
touchTipAfterAspirateOffsetMmFromTop: -14.5,
10841084
aspirateAirGapVolume: 31,
10851085
// dispense column
10861086
dispenseDelay: { seconds: 12, mmFromBottom: 14 },
@@ -1209,7 +1209,7 @@ describe('consolidate single-channel', () => {
12091209
wellLocation: {
12101210
origin: 'top',
12111211
offset: {
1212-
z: 14.5,
1212+
z: -14.5,
12131213
},
12141214
},
12151215
},
@@ -1302,7 +1302,7 @@ describe('consolidate single-channel', () => {
13021302
wellLocation: {
13031303
origin: 'top',
13041304
offset: {
1305-
z: 14.5,
1305+
z: -14.5,
13061306
},
13071307
},
13081308
},
@@ -1451,7 +1451,7 @@ describe('consolidate single-channel', () => {
14511451
wellLocation: {
14521452
origin: 'top',
14531453
offset: {
1454-
z: 3.4,
1454+
z: -3.4,
14551455
},
14561456
},
14571457
},
@@ -1568,7 +1568,7 @@ describe('consolidate single-channel', () => {
15681568
wellLocation: {
15691569
origin: 'top',
15701570
offset: {
1571-
z: 14.5,
1571+
z: -14.5,
15721572
},
15731573
},
15741574
},
@@ -1717,7 +1717,7 @@ describe('consolidate single-channel', () => {
17171717
wellLocation: {
17181718
origin: 'top',
17191719
offset: {
1720-
z: 3.4,
1720+
z: -3.4,
17211721
},
17221722
},
17231723
},
@@ -1773,7 +1773,7 @@ describe('consolidate single-channel', () => {
17731773
preWetTip: true,
17741774
aspirateDelay: { seconds: 11, mmFromBottom: 15 },
17751775
touchTipAfterAspirate: true,
1776-
touchTipAfterAspirateOffsetMmFromTop: 14.5,
1776+
touchTipAfterAspirateOffsetMmFromTop: -14.5,
17771777
aspirateAirGapVolume: 31,
17781778
// dispense column
17791779
dispenseDelay: { seconds: 12, mmFromBottom: 14 },
@@ -1908,7 +1908,7 @@ describe('consolidate single-channel', () => {
19081908
wellLocation: {
19091909
origin: 'top',
19101910
offset: {
1911-
z: 14.5,
1911+
z: -14.5,
19121912
},
19131913
},
19141914
},
@@ -2001,7 +2001,7 @@ describe('consolidate single-channel', () => {
20012001
wellLocation: {
20022002
origin: 'top',
20032003
offset: {
2004-
z: 14.5,
2004+
z: -14.5,
20052005
},
20062006
},
20072007
},
@@ -2165,7 +2165,7 @@ describe('consolidate single-channel', () => {
21652165
wellLocation: {
21662166
origin: 'top',
21672167
offset: {
2168-
z: 3.4,
2168+
z: -3.4,
21692169
},
21702170
},
21712171
},
@@ -2282,7 +2282,7 @@ describe('consolidate single-channel', () => {
22822282
wellLocation: {
22832283
origin: 'top',
22842284
offset: {
2285-
z: 14.5,
2285+
z: -14.5,
22862286
},
22872287
},
22882288
},
@@ -2446,7 +2446,7 @@ describe('consolidate single-channel', () => {
24462446
wellLocation: {
24472447
origin: 'top',
24482448
offset: {
2449-
z: 3.4,
2449+
z: -3.4,
24502450
},
24512451
},
24522452
},
@@ -2499,7 +2499,7 @@ describe('consolidate single-channel', () => {
24992499
preWetTip: true,
25002500
aspirateDelay: { seconds: 11, mmFromBottom: 15 },
25012501
touchTipAfterAspirate: true,
2502-
touchTipAfterAspirateOffsetMmFromTop: 14.5,
2502+
touchTipAfterAspirateOffsetMmFromTop: -14.5,
25032503
aspirateAirGapVolume: 31,
25042504
// dispense column
25052505
dispenseDelay: { seconds: 12, mmFromBottom: 14 },
@@ -2634,7 +2634,7 @@ describe('consolidate single-channel', () => {
26342634
wellLocation: {
26352635
origin: 'top',
26362636
offset: {
2637-
z: 14.5,
2637+
z: -14.5,
26382638
},
26392639
},
26402640
},
@@ -2727,7 +2727,7 @@ describe('consolidate single-channel', () => {
27272727
wellLocation: {
27282728
origin: 'top',
27292729
offset: {
2730-
z: 14.5,
2730+
z: -14.5,
27312731
},
27322732
},
27332733
},
@@ -2891,7 +2891,7 @@ describe('consolidate single-channel', () => {
28912891
wellLocation: {
28922892
origin: 'top',
28932893
offset: {
2894-
z: 3.4,
2894+
z: -3.4,
28952895
},
28962896
},
28972897
},
@@ -3051,7 +3051,7 @@ describe('consolidate single-channel', () => {
30513051
wellLocation: {
30523052
origin: 'top',
30533053
offset: {
3054-
z: 14.5,
3054+
z: -14.5,
30553055
},
30563056
},
30573057
},
@@ -3215,7 +3215,7 @@ describe('consolidate single-channel', () => {
32153215
wellLocation: {
32163216
origin: 'top',
32173217
offset: {
3218-
z: 3.4,
3218+
z: -3.4,
32193219
},
32203220
},
32213221
},

0 commit comments

Comments
 (0)