diff --git a/app/src/assets/localization/en/protocol_details.json b/app/src/assets/localization/en/protocol_details.json index f64bf8ea402..e84b54d1ad7 100644 --- a/app/src/assets/localization/en/protocol_details.json +++ b/app/src/assets/localization/en/protocol_details.json @@ -23,7 +23,6 @@ "file_required": "File required", "go_to_labware_definition": "Go to labware definition", "go_to_timeline": "Go to timeline", - "gripper_pick_up_count": "Grip Count", "gripper_pick_up_count_description": "individual move labware commands that use the gripper.", "gripper_pick_up_count": "Grip Count", "hardware": "hardware", diff --git a/app/src/assets/localization/en/protocol_list.json b/app/src/assets/localization/en/protocol_list.json index 669157a6187..4863fad8285 100644 --- a/app/src/assets/localization/en/protocol_list.json +++ b/app/src/assets/localization/en/protocol_list.json @@ -2,6 +2,7 @@ "csv_file_required": "CSV file required for analysis. Add the CSV during run setup.", "delete_protocol_message": " and its run history will be permanently deleted.", "delete_this_protocol": "Delete this protocol?", + "go_to_timeline": "Go to timeline", "last_updated_at": "Updated {{date}}", "left_mount": "left mount", "loading_data": "Loading data...", diff --git a/app/src/molecules/Command/LoadCommandText.tsx b/app/src/molecules/Command/LoadCommandText.tsx index 251d0f3d38d..36aaa6ab181 100644 --- a/app/src/molecules/Command/LoadCommandText.tsx +++ b/app/src/molecules/Command/LoadCommandText.tsx @@ -32,7 +32,6 @@ export const LoadCommandText = ({ robotType, }: LoadCommandTextProps): JSX.Element | null => { const { t } = useTranslation('run_details') - switch (command.commandType) { case 'loadPipette': { const pipetteModel = getPipetteNameOnMount( diff --git a/app/src/molecules/Command/utils/getCommandTextData.ts b/app/src/molecules/Command/utils/getCommandTextData.ts index bf1a5a07f2e..b51167bd8d2 100644 --- a/app/src/molecules/Command/utils/getCommandTextData.ts +++ b/app/src/molecules/Command/utils/getCommandTextData.ts @@ -1,12 +1,13 @@ import type { LegacyGoodRunData } from '@opentrons/api-client' import type { CompletedProtocolAnalysis, + ProtocolAnalysisOutput, RunTimeCommand, } from '@opentrons/shared-data' import type { CommandTextData } from '../types' export function getCommandTextData( - protocolData: CompletedProtocolAnalysis | LegacyGoodRunData, + protocolData: CompletedProtocolAnalysis | LegacyGoodRunData | ProtocolAnalysisOutput, protocolCommands?: RunTimeCommand[] ): CommandTextData { const { pipettes, labware, modules, liquids } = protocolData diff --git a/app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx b/app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx index 52b5f404f9b..b9dc9a46ed2 100644 --- a/app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx +++ b/app/src/organisms/ProtocolDetails/AnnotatedSteps.tsx @@ -1,10 +1,10 @@ import * as React from 'react' import { css } from 'styled-components' +import { FLEX_ROBOT_TYPE } from '@opentrons/shared-data' import { ALIGN_CENTER, ALIGN_FLEX_START, BORDERS, COLORS, DIRECTION_COLUMN, Flex, Icon, SPACING, StyledText, TYPOGRAPHY } from '@opentrons/components' -import { CommandText } from '../CommandText' -import { CommandIcon } from '../RunPreview/CommandIcon' +import { CommandIcon, CommandText } from '../../molecules/Command' -import { FLEX_ROBOT_TYPE, type CompletedProtocolAnalysis, type ProtocolAnalysisOutput, type RunTimeCommand } from '@opentrons/shared-data' +import type { CompletedProtocolAnalysis, ProtocolAnalysisOutput, RunTimeCommand } from '@opentrons/shared-data' interface AnnotatedStepsProps { analysis: CompletedProtocolAnalysis | ProtocolAnalysisOutput diff --git a/app/src/organisms/ProtocolTimelineScrubber/index.tsx b/app/src/organisms/ProtocolTimelineScrubber/index.tsx index 03e4a991d6f..40715c4a208 100644 --- a/app/src/organisms/ProtocolTimelineScrubber/index.tsx +++ b/app/src/organisms/ProtocolTimelineScrubber/index.tsx @@ -34,12 +34,14 @@ import type { PipetteEntity, TimelineFrame, } from '@opentrons/step-generation' -import ViewportList, { ViewportListRef } from 'react-viewport-list' -import { CommandText } from '../CommandText' +import ViewportList from 'react-viewport-list' import { AnnotatedSteps } from '../ProtocolDetails/AnnotatedSteps' +import { getWellFillFromLabwareId } from '../Devices/ProtocolRun/SetupLiquids/utils' +import { CommandText } from '../../molecules/Command' +import type { ViewportListRef } from 'react-viewport-list' import type {LabwareOnDeck } from '@opentrons/components' -import { getWellFillFromLabwareId } from '../Devices/ProtocolRun/SetupLiquids/utils' +import { getCommandTextData } from '../../molecules/Command/utils/getCommandTextData' const COMMAND_WIDTH_PX = 240 @@ -460,7 +462,7 @@ function CommandItem(props: CommandItemProps): JSX.Element { alignSelf={ALIGN_FLEX_END}> {index + 1} - + {showDetails ? Object.entries(command.params ?? {}).map(([key, value]) => (