Skip to content

Commit

Permalink
feat(app): only show labware svg for map view off deck labware in lis…
Browse files Browse the repository at this point in the history
…t item

fix PLAT-369
  • Loading branch information
smb2268 committed Jul 18, 2024
1 parent 882749f commit 2d3e8ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ interface LabwareListItemProps extends LabwareSetupItem {
isFlex: boolean
commands: RunTimeCommand[]
nestedLabwareInfo: NestedLabwareInfo | null
showLabwareSVG?: boolean
}

export function LabwareListItem(
Expand All @@ -83,6 +84,7 @@ export function LabwareListItem(
isFlex,
commands,
nestedLabwareInfo,
showLabwareSVG,
} = props
const { t } = useTranslation('protocol_setup')
const [
Expand Down Expand Up @@ -263,11 +265,11 @@ export function LabwareListItem(
</Flex>
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing16}>
<Flex>
<StandaloneLabware definition={definition} />
{showLabwareSVG && <StandaloneLabware definition={definition} />}
<Flex
flexDirection={DIRECTION_COLUMN}
justifyContent={JUSTIFY_CENTER}
marginLeft={SPACING.spacing16}
marginLeft={showLabwareSVG ? SPACING.spacing12 : SPACING.spacing8}
marginRight={SPACING.spacing24}
>
<LegacyStyledText as="p" fontWeight={TYPOGRAPHY.fontWeightSemiBold}>
Expand All @@ -281,15 +283,10 @@ export function LabwareListItem(
{nestedLabwareInfo != null &&
nestedLabwareInfo?.sharedSlotId === slotInfo ? (
<Flex>
{nestedLabwareInfo.nestedLabwareDefinition != null ? (
<StandaloneLabware
definition={nestedLabwareInfo.nestedLabwareDefinition}
/>
) : null}
<Flex
flexDirection={DIRECTION_COLUMN}
justifyContent={JUSTIFY_CENTER}
marginLeft={SPACING.spacing16}
marginLeft={SPACING.spacing8}
marginRight={SPACING.spacing24}
>
<LegacyStyledText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export function OffDeckLabwareList(
isFlex={isFlex}
commands={commands}
nestedLabwareInfo={null}
showLabwareSVG
/>
))}
</>
Expand Down

0 comments on commit 2d3e8ea

Please sign in to comment.