diff --git a/app/src/molecules/Command/CommandText.tsx b/app/src/molecules/Command/CommandText.tsx index e1d76453387..071dfd0dea7 100644 --- a/app/src/molecules/Command/CommandText.tsx +++ b/app/src/molecules/Command/CommandText.tsx @@ -52,6 +52,7 @@ interface Props extends StyleProps { command: RunTimeCommand commandTextData: CommandTextData robotType: RobotType + as?: React.ComponentProps['as'] isOnDevice?: boolean propagateCenter?: boolean propagateTextLimit?: boolean @@ -63,6 +64,7 @@ export function CommandText(props: Props): JSX.Element | null { robotType, propagateCenter = false, propagateTextLimit = false, + as = 'p', ...styleProps } = props const { t } = useTranslation('protocol_command_text') @@ -81,7 +83,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'dropTipInPlace': case 'pickUpTip': { return ( - + ) @@ -91,7 +93,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'loadModule': case 'loadLiquid': { return ( - + ) @@ -102,7 +104,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'thermocycler/setTargetLidTemperature': case 'heaterShaker/setTargetTemperature': { return ( - + ) @@ -135,12 +137,12 @@ export function CommandText(props: Props): JSX.Element | null { } ; `} > - + {t('tc_starting_profile', { repetitions: Object.keys(steps).length, })} - +
    {shouldPropagateTextLimit ? (
  • + {t('set_and_await_hs_shake', { rpm })} ) @@ -179,7 +181,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'moveToSlot': { const { slotName } = command.params return ( - + {t('move_to_slot', { slot_name: slotName })} ) @@ -187,7 +189,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'moveRelative': { const { axis, distance } = command.params return ( - + {t('move_relative', { axis, distance })} ) @@ -195,7 +197,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'moveToCoordinates': { const { coordinates } = command.params return ( - + {t('move_to_coordinates', coordinates)} ) @@ -220,7 +222,7 @@ export function CommandText(props: Props): JSX.Element | null { ) : '' return ( - + {t('move_to_well', { well_name: wellName, labware: getLabwareName(commandTextData, labwareId), @@ -231,7 +233,7 @@ export function CommandText(props: Props): JSX.Element | null { } case 'moveLabware': { return ( - + @@ -245,7 +247,7 @@ export function CommandText(props: Props): JSX.Element | null { )?.pipetteName return ( - + {t('configure_for_volume', { volume, pipette: @@ -264,7 +266,7 @@ export function CommandText(props: Props): JSX.Element | null { // TODO (sb, 11/9/23): Add support for other configurations when needed return ( - + {t('configure_nozzle_layout', { amount: configurationParams.style === 'COLUMN' ? '8' : 'all', pipette: @@ -282,7 +284,7 @@ export function CommandText(props: Props): JSX.Element | null { )?.pipetteName return ( - + {t('prepare_to_aspirate', { pipette: pipetteName != null @@ -300,7 +302,7 @@ export function CommandText(props: Props): JSX.Element | null { ) return ( - + {t('move_to_addressable_area', { addressable_area: addressableAreaDisplayName, })} @@ -314,7 +316,7 @@ export function CommandText(props: Props): JSX.Element | null { t ) return ( - + {t('move_to_addressable_area_drop_tip', { addressable_area: addressableAreaDisplayName, })} @@ -342,7 +344,7 @@ export function CommandText(props: Props): JSX.Element | null { const simpleTKey = SIMPLE_TRANSLATION_KEY_BY_COMMAND_TYPE[command.commandType] return ( - + {simpleTKey != null ? t(simpleTKey) : null} ) @@ -350,7 +352,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'waitForDuration': { const { seconds, message } = command.params return ( - + {t('wait_for_duration', { seconds, message })} ) @@ -358,7 +360,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'pause': // legacy pause command case 'waitForResume': { return ( - + {command.params?.message && command.params.message !== '' ? command.params.message : t('wait_for_resume')} @@ -370,7 +372,7 @@ export function CommandText(props: Props): JSX.Element | null { const { message = '' } = command.params if ('waitForResume' in command.params) { return ( - + {command.params?.message && command.params.message !== '' ? command.params.message : t('wait_for_resume')} @@ -378,7 +380,7 @@ export function CommandText(props: Props): JSX.Element | null { ) } else { return ( - + {t('wait_for_duration', { seconds: command.params.seconds, message, @@ -390,7 +392,7 @@ export function CommandText(props: Props): JSX.Element | null { case 'comment': { const { message } = command.params return ( - + {message} ) @@ -402,7 +404,7 @@ export function CommandText(props: Props): JSX.Element | null { ? JSON.stringify(legacyCommandText) : String(legacyCommandText) return ( - + {legacyCommandText != null ? sanitizedCommandText : `${command.commandType}: ${JSON.stringify(command.params)}`} @@ -415,7 +417,7 @@ export function CommandText(props: Props): JSX.Element | null { command ) return ( - + {JSON.stringify(command)} ) diff --git a/app/src/organisms/ErrorRecoveryFlows/shared/StepInfo.tsx b/app/src/organisms/ErrorRecoveryFlows/shared/StepInfo.tsx index e6a45282d24..5cee456b4ae 100644 --- a/app/src/organisms/ErrorRecoveryFlows/shared/StepInfo.tsx +++ b/app/src/organisms/ErrorRecoveryFlows/shared/StepInfo.tsx @@ -47,6 +47,7 @@ export function StepInfo({ commandTextData={protocolAnalysis} robotType={robotType} display={DISPLAY_INLINE} + as={as} /> ) : null}