Skip to content

fix(app): Ensure stacker display location is 3+4, shuttle labware slot is 4 #19167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: chore_release-8.6.0
Choose a base branch
from
Open
3 changes: 1 addition & 2 deletions app/src/assets/localization/en/protocol_command_text.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@
"single": "single",
"single_nozzle_layout": "single nozzle layout",
"slot": "Slot {{slot_name}}",
"stacker_display_name": "Stacker {{stacker_slot}}",
"stacker_column_display_name": "Stacker in Column {{stacker_slot}}",
"stacker_hopper_display": "Stacker {{row}}",
"target_temperature": "target temperature",
"tc_awaiting_for_duration": "Waiting for Thermocycler profile to complete",
"tc_run_profile_steps": "Temperature: {{celsius}}°C, hold time: {{duration}}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@ import {
getCutoutIdForSlotName,
getDeckDefFromRobotType,
getFixtureDisplayName,
getModuleType,
getModuleDeckLabel,
HEATERSHAKER_MODULE_TYPE,
HEATERSHAKER_MODULE_V1,
MAGNETIC_BLOCK_TYPE,
MAGNETIC_BLOCK_V1,
OT2_ROBOT_TYPE,
TC_MODULE_LOCATION_OT2,
TC_MODULE_LOCATION_OT3,
WASTE_CHUTE_FLEX_STACKER_FIXTURES,
} from '@opentrons/shared-data'

Expand Down Expand Up @@ -68,6 +66,7 @@ import type {
CutoutFixtureId,
DeckDefinition,
ModuleModel,
ModuleType,
} from '@opentrons/shared-data'
import type { ModulePrepCommandsType } from '/app/local-resources/modules'
import type { AttachedModule } from '/app/redux/modules/types'
Expand Down Expand Up @@ -126,11 +125,11 @@ export const SetupModulesList = (props: SetupModulesListProps): JSX.Element => {
}) => {
// filter out the magnetic block here, because it is handled by the SetupFixturesList
if (moduleDef.moduleType === MAGNETIC_BLOCK_TYPE) return null
// if the module is a flex stacker in D4, check if it needs a waste chute
// if the module is a flex stacker in row D, check if it needs a waste chute
// combo fixture
if (
moduleDef.moduleType === FLEX_STACKER_MODULE_TYPE &&
slotName === 'D4'
slotName[0] === 'D'
) {
const deckConfigCompatabilityD3 = deckConfigCompatibility?.find(
configItem => configItem.cutoutId === 'cutoutD3'
Expand All @@ -153,6 +152,7 @@ export const SetupModulesList = (props: SetupModulesListProps): JSX.Element => {
moduleDef.model
)}_slot_${slotName}`}
moduleModel={moduleDef.model}
moduleType={moduleDef.moduleType}
displayName={moduleDef.displayName}
slotName={slotName}
attachedModuleMatch={attachedModuleMatch}
Expand All @@ -175,6 +175,7 @@ export const SetupModulesList = (props: SetupModulesListProps): JSX.Element => {
moduleDef.model
)}_slot_${slotName}`}
moduleModel={moduleDef.model}
moduleType={moduleDef.moduleType}
displayName={moduleDef.displayName}
slotName={slotName}
attachedModuleMatch={attachedModuleMatch}
Expand All @@ -200,6 +201,7 @@ export const SetupModulesList = (props: SetupModulesListProps): JSX.Element => {

interface ModulesListItemProps {
moduleModel: ModuleModel
moduleType: ModuleType
displayName: string
slotName: string
attachedModuleMatch: AttachedModule | null
Expand All @@ -218,6 +220,7 @@ interface ModulesListItemProps {

export function ModulesListItem({
moduleModel,
moduleType,
displayName,
slotName,
attachedModuleMatch,
Expand Down Expand Up @@ -470,11 +473,7 @@ export function ModulesListItem({
justifyContent={JUSTIFY_CENTER}
>
<LegacyStyledText as="p">
{getModuleType(moduleModel) === 'thermocyclerModuleType'
? isFlex
? TC_MODULE_LOCATION_OT3
: TC_MODULE_LOCATION_OT2
: slotName}
{getModuleDeckLabel(moduleType, slotName)}
</LegacyStyledText>
{portDisplay != null ? (
<LegacyStyledText as="p">{portDisplay}</LegacyStyledText>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const MOCK_SECOND_MAGNETIC_MODULE_COORDS = [100, 200, 0]
const mockMagneticModule = {
moduleId: 'someMagneticModule',
model: 'magneticModuleV2' as ModuleModel,
type: 'magneticModuleType' as ModuleType,
moduleType: 'magneticModuleType' as ModuleType,
labwareOffset: { x: 5, y: 5, z: 5 },
cornerOffsetFromSlot: { x: 1, y: 1, z: 1 },
calibrationPoint: { x: 0, y: 0 },
Expand All @@ -65,7 +65,7 @@ const mockTCModule = {
labwareOffset: { x: 3, y: 3, z: 3 },
moduleId: 'TCModuleId',
model: 'thermocyclerModuleV1' as ModuleModel,
type: 'thermocyclerModuleType' as ModuleType,
moduleType: 'thermocyclerModuleType' as ModuleType,
displayName: 'Thermocycler Module',
}

Expand Down Expand Up @@ -219,7 +219,7 @@ describe('SetupModulesList', () => {
nestedLabwareDef: null,
nestedLabwareId: null,
protocolLoadOrder: 0,
slotName: '7',
slotName: 'B1',
attachedModuleMatch: mockThermocycler,
},
} as any)
Expand Down Expand Up @@ -282,7 +282,7 @@ describe('SetupModulesList', () => {
nestedLabwareDef: null,
nestedLabwareId: null,
protocolLoadOrder: 0,
slotName: '7',
slotName: 'B1',
attachedModuleMatch: {
...mockThermocycler,
moduleOffset: mockCalibratedData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@ import {
FLEX_USB_MODULE_FIXTURES,
getCutoutDisplayName,
getFixtureDisplayName,
getModuleDeckLabel,
getModuleDisplayName,
getModuleType,
getPipetteNameSpecs,
MAGNETIC_BLOCK_FIXTURES,
MAGNETIC_BLOCK_TYPE,
SINGLE_SLOT_FIXTURES,
THERMOCYCLER_MODULE_TYPE,
} from '@opentrons/shared-data'

import { InstrumentContainer } from '/app/atoms/InstrumentContainer'
import { Divider } from '/app/atoms/structure'

import { getRobotTypeDisplayName } from '../ProtocolsLanding/utils'
import { getSlotsForThermocycler } from './utils'

import type { TFunction } from 'i18next'
import type { ReactNode } from 'react'
Expand Down Expand Up @@ -167,12 +166,10 @@ export const RobotConfigurationDetails = (
<Fragment key={`module_${index}`}>
<Divider marginY={SPACING.spacing12} width="100%" />
<RobotConfigurationDetailsItem
label={`${t('slot')} ${
getModuleType(module.params.model) ===
THERMOCYCLER_MODULE_TYPE
? getSlotsForThermocycler(robotType)
: module.params.location.slotName
}`}
label={`${t('slot')} ${getModuleDeckLabel(
getModuleType(module.params.model),
module.params.location.slotName
)}`}
item={
<>
<ModuleIcon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ export function LeftColumnLabwareInfo({
labwareName: failedLabwareNames.name ?? '',
labwareNickname: failedLabwareNames.nickName,
currentLocationProps: {
deckLabel: displayNameCurrentLoc.toUpperCase(),
deckLabel: `STACKER ${(
displayNameCurrentLoc?.toUpperCase() ?? ''
).charAt(0)}`,
},
}
case STACKER_STALLED_SKIP.STEPS.PLACE_LABWARE_ON_SHUTTLE:
Expand All @@ -86,7 +88,9 @@ export function LeftColumnLabwareInfo({
labwareName: failedLabwareNames.name ?? '',
labwareNickname: failedLabwareNames.nickName,
currentLocationProps: {
deckLabel: displayNameNewLoc?.toUpperCase() ?? '',
deckLabel: `${(displayNameNewLoc?.toUpperCase() ?? '').charAt(
0
)}4`,
},
}
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ export function StackerHopperLwInfo(props: RecoveryContentProps): JSX.Element {
<LeftColumnLabwareInfo
{...props}
title={t('ensure_stacker_has_labware')}
type={'location'}
layout={'stacked'}
type="location"
layout="stacked"
bannerText={t('make_sure_loaded_correct_number_of_labware_stacker')}
/>
<RightColumnAnimation animationSrc={FillHopper} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export function StackerShuttleLwInfo(props: RecoveryContentProps): JSX.Element {
<LeftColumnLabwareInfo
{...props}
title={t('load_labware_into_labware_shuttle')}
type={'location'}
layout={'stacked'}
type="location"
layout="default"
showQuantity={false}
/>
<RightColumnAnimation animationSrc={ShuttleLabware} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export function TwoColLwInfoAndDeck(
{...props}
title={buildTitle()}
type={buildType()}
layout={'default'}
layout="default"
bannerText={buildBannerText()}
/>
<Flex marginTop="0.7rem">{buildDeckView()}</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('Render StackerShuttleLwInfo', () => {
expect.objectContaining({
title: 'Load labware onto labware shuttle',
type: 'location',
layout: 'stacked',
layout: 'default',
showQuantity: false,
}),
expect.anything()
Expand Down
Loading
Loading