Skip to content

Commit 3ef9767

Browse files
committed
refactor(app, components, protocol-designer): update moveToWell command text
1 parent 9e96e01 commit 3ef9767

File tree

5 files changed

+16
-7
lines changed

5 files changed

+16
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"move_to_addressable_area_drop_tip": "Moving to {{addressable_area}}",
6161
"move_to_coordinates": "Moving to (X: {{x}}, Y: {{y}}, Z: {{z}})",
6262
"move_to_slot": "Moving to Slot {{slot_name}}",
63-
"move_to_well": "Moving to well {{well_name}} of {{labware}} in {{labware_location}}",
63+
"move_to_well": "Moving to well {{wellName}} of {{labware}} with x,y,z offset {{xOffset}}, {{yOffset}}, {{zOffset}} relative to {{positionRelative}} in {{displayLocation}}",
6464
"multiple": "multiple",
6565
"notes": "notes",
6666
"off_deck": "off deck",

components/src/assets/localization/en/protocol_command_text.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"move_to_addressable_area_drop_tip": "Moving to {{addressable_area}}",
5555
"move_to_coordinates": "Moving to (X: {{x}}, Y: {{y}}, Z: {{z}})",
5656
"move_to_slot": "Moving to Slot {{slot_name}}",
57-
"move_to_well": "Moving to well {{well_name}} of {{labware}} in {{labware_location}}",
57+
"move_to_well": "Moving to well {{wellName}} of {{labware}} with x,y,z offset {{xOffset}}, {{yOffset}}, {{zOffset}} relative to {{positionRelative}} in {{displayLocation}}",
5858
"multiple": "multiple",
5959
"notes": "notes",
6060
"off_deck": "off deck",

components/src/organisms/CommandText/__tests__/CommandText.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ describe('CommandText', () => {
216216
{ i18nInstance: i18n }
217217
)
218218
screen.getByText(
219-
'Moving to well A1 of NEST 1 Well Reservoir 195 mL in Slot 5'
219+
'Moving to well A1 of NEST 1 Well Reservoir 195 mL with x,y,z offset 0.00, 0.00, -24.00 relative to top in Slot 5'
220220
)
221221
}
222222
})

components/src/organisms/CommandText/useCommandTextString/utils/commandText/getMoveToWellCommandText.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@ export function getMoveToWellCommandText({
1212
commandTextData,
1313
robotType,
1414
}: HandlesCommands<MoveToWellRunTimeCommand>): string {
15-
const { wellName, labwareId } = command.params
15+
const { wellName, labwareId, wellLocation } = command.params
16+
const {
17+
x: xOffsetUnformatted,
18+
y: yOffsetUnformatted,
19+
z: zOffsetUnformatted,
20+
} = wellLocation.offset
1621
const allPreviousCommands = commandTextData?.commands.slice(
1722
0,
1823
commandTextData.commands.findIndex(c => c.id === command.id)
@@ -32,7 +37,7 @@ export function getMoveToWellCommandText({
3237
})
3338

3439
return t('move_to_well', {
35-
well_name: wellName,
40+
wellName,
3641
labware:
3742
commandTextData != null
3843
? getLabwareName({
@@ -41,6 +46,10 @@ export function getMoveToWellCommandText({
4146
allRunDefs,
4247
})
4348
: null,
44-
labware_location: displayLocation,
49+
xOffset: xOffsetUnformatted.toFixed(2),
50+
yOffset: yOffsetUnformatted.toFixed(2),
51+
zOffset: zOffsetUnformatted.toFixed(2),
52+
positionRelative: wellLocation.origin,
53+
displayLocation,
4554
})
4655
}

protocol-designer/src/assets/localization/en/protocol_command_text.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"move_to_addressable_area_drop_tip": "Moving to {{addressable_area}}",
5555
"move_to_coordinates": "Moving to (X: {{x}}, Y: {{y}}, Z: {{z}})",
5656
"move_to_slot": "Moving to Slot {{slot_name}}",
57-
"move_to_well": "Moving to well {{well_name}} of {{labware}} in {{labware_location}}",
57+
"move_to_well": "Moving to well {{wellName}} of {{labware}} with x,y,z offset {{xOffset}}, {{yOffset}}, {{zOffset}} relative to {{positionRelative}} in {{displayLocation}}",
5858
"multiple": "multiple",
5959
"notes": "notes",
6060
"off_deck": "off deck",

0 commit comments

Comments
 (0)