Skip to content

Commit

Permalink
feat(app, components): ProtocolRun RTPs (#14745)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 authored Apr 1, 2024
1 parent c864a99 commit 34cdcb6
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 225 deletions.
1 change: 1 addition & 0 deletions app/src/assets/localization/en/protocol_setup.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
"no_modules_specified": "no modules are specified for this protocol.",
"no_modules_used_in_this_protocol": "No hardware used in this protocol",
"no_parameters_specified": "No parameters specified",
"no_parameters_specified_in_protocol": "No parameters specified in this protocol",
"no_tiprack_loaded": "Protocol must load a tip rack",
"no_tiprack_used": "Protocol must pick up a tip",
"no_usb_connection_required": "No USB connection required",
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/ChooseRobotSlideout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ interface ChooseRobotSlideoutProps
isAnalysisError?: boolean
isAnalysisStale?: boolean
showIdleOnly?: boolean
multiSlideout?: { currentPage: number }
multiSlideout?: { currentPage: number } | null
}

export function ChooseRobotSlideout(
Expand All @@ -135,7 +135,7 @@ export function ChooseRobotSlideout(
setSelectedRobot,
robotType,
showIdleOnly = false,
multiSlideout,
multiSlideout = null,
runTimeParametersOverrides,
setRunTimeParametersOverrides,
} = props
Expand Down
14 changes: 8 additions & 6 deletions app/src/organisms/ChooseRobotToRunProtocolSlideout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ interface ChooseRobotToRunProtocolSlideoutProps extends StyleProps {
storedProtocolData: StoredProtocolData
onCloseClick: () => void
showSlideout: boolean
runTimeParameters?: RunTimeParameter[]
}

export function ChooseRobotToRunProtocolSlideoutComponent(
Expand All @@ -63,6 +62,8 @@ export function ChooseRobotToRunProtocolSlideoutComponent(
)

// TODO: (nd: 3/20/24) remove stubs and pull parameters from analysis
// const runTimeParameters =
// storedProtocolData.mostRecentAnalysis?.runTimeParameters ?? []
const mockRunTimeParameters: RunTimeParameter[] = [
{
displayName: 'Dry Run',
Expand Down Expand Up @@ -230,18 +231,19 @@ export function ChooseRobotToRunProtocolSlideoutComponent(
</PrimaryButton>
)

const hasRunTimeParameters =
enableRunTimeParametersFF && runTimeParameters.length > 0

return (
<ChooseRobotSlideout
multiSlideout={{ currentPage }}
multiSlideout={hasRunTimeParameters ? { currentPage } : null}
isExpanded={showSlideout}
isSelectedRobotOnDifferentSoftwareVersion={
isSelectedRobotOnDifferentSoftwareVersion
}
onCloseClick={onCloseClick}
title={
enableRunTimeParametersFF &&
runTimeParameters.length > 0 &&
currentPage === 2
hasRunTimeParameters && currentPage === 2
? t('select_parameters_for_robot', {
robot_name: selectedRobot?.name,
})
Expand All @@ -253,7 +255,7 @@ export function ChooseRobotToRunProtocolSlideoutComponent(
setRunTimeParametersOverrides={setRunTimeParametersOverrides}
footer={
<Flex flexDirection={DIRECTION_COLUMN}>
{enableRunTimeParametersFF && runTimeParameters.length > 0 ? (
{hasRunTimeParameters ? (
currentPage === 1 ? (
<>
<ApplyHistoricOffsets
Expand Down
Loading

0 comments on commit 34cdcb6

Please sign in to comment.