From 8940797d5317097ec2b0ed48c70b0dd780abd0a9 Mon Sep 17 00:00:00 2001 From: CaseyBatten Date: Tue, 10 Sep 2024 17:20:30 -0400 Subject: [PATCH] fix(app): display correct pipette configuration names in run preview (#16191) Covers RQA-3128 Includes all configurations in the app run preview for any given layout --- .../assets/localization/en/protocol_command_text.json | 2 +- .../utils/getConfigureNozzleLayoutCommandText.ts | 11 ++++++++++- shared-data/command/types/setup.ts | 6 +++--- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/app/src/assets/localization/en/protocol_command_text.json b/app/src/assets/localization/en/protocol_command_text.json index b050ff7bc7a..40f0fe3044e 100644 --- a/app/src/assets/localization/en/protocol_command_text.json +++ b/app/src/assets/localization/en/protocol_command_text.json @@ -8,7 +8,7 @@ "closing_tc_lid": "Closing Thermocycler lid", "comment": "Comment", "configure_for_volume": "Configure {{pipette}} to aspirate {{volume}} µL", - "configure_nozzle_layout": "Configure {{pipette}} to use {{amount}} nozzles", + "configure_nozzle_layout": "Configure {{pipette}} to use {{layout}}", "confirm_and_resume": "Confirm and resume", "deactivate_hs_shake": "Deactivating shaker", "deactivate_temperature_module": "Deactivating Temperature Module", diff --git a/app/src/molecules/Command/hooks/useCommandTextString/utils/getConfigureNozzleLayoutCommandText.ts b/app/src/molecules/Command/hooks/useCommandTextString/utils/getConfigureNozzleLayoutCommandText.ts index e6693a4b937..04d476fadd1 100644 --- a/app/src/molecules/Command/hooks/useCommandTextString/utils/getConfigureNozzleLayoutCommandText.ts +++ b/app/src/molecules/Command/hooks/useCommandTextString/utils/getConfigureNozzleLayoutCommandText.ts @@ -13,8 +13,17 @@ export function getConfigureNozzleLayoutCommandText({ pip => pip.id === pipetteId )?.pipetteName + // TODO(cb, 2024-09-10): confirm these strings for copy consistency and add them to i18n + const ConfigAmount = { + SINGLE: 'single nozzle layout', + COLUMN: 'column layout', + ROW: 'row layout', + QUADRANT: 'partial layout', + ALL: 'all nozzles', + } + return t('configure_nozzle_layout', { - amount: configurationParams.style === 'COLUMN' ? '8' : 'all', + layout: ConfigAmount[configurationParams.style], pipette: pipetteName != null ? getPipetteSpecsV2(pipetteName)?.displayName : '', }) diff --git a/shared-data/command/types/setup.ts b/shared-data/command/types/setup.ts index 85613421b45..0be40e6de13 100644 --- a/shared-data/command/types/setup.ts +++ b/shared-data/command/types/setup.ts @@ -175,9 +175,9 @@ interface LoadLiquidResult { } export const COLUMN = 'COLUMN' -const SINGLE = 'SINGLE' -const ROW = 'ROW' -const QUADRANT = 'QUADRANT' +export const SINGLE = 'SINGLE' +export const ROW = 'ROW' +export const QUADRANT = 'QUADRANT' export const ALL = 'ALL' export type NozzleConfigurationStyle =