Skip to content

Commit f50ade5

Browse files
committed
feat(app): highlight ODD tappable labware
adds a labware highlight outline to tappable labware on the ODD labware map view modal closes PLAT-371
1 parent d61e4bf commit f50ade5

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

app/src/organisms/ProtocolSetupLabware/LabwareMapViewModal.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export function LabwareMapViewModal(
8383
handleLabwareClick(topLabwareDefinition, topLabwareId)
8484
}
8585
: undefined,
86+
highlightLabware: true,
8687
moduleChildren: null,
8788
}
8889
})
@@ -105,6 +106,7 @@ export function LabwareMapViewModal(
105106
handleLabwareClick(topLabwareDefinition, topLabwareId)
106107
},
107108
labwareChildren: null,
109+
highlight: true,
108110
}
109111
}
110112
)

components/src/hardware-sim/BaseDeck/BaseDeck.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export interface LabwareOnDeck {
5454
/** generic prop to render self-positioned children for each labware */
5555
labwareChildren?: React.ReactNode
5656
onLabwareClick?: () => void
57+
highlight?: boolean
5758
}
5859

5960
export interface ModuleOnDeck {
@@ -65,6 +66,7 @@ export interface ModuleOnDeck {
6566
/** generic prop to render self-positioned children for each module */
6667
moduleChildren?: React.ReactNode
6768
onLabwareClick?: () => void
69+
highlightLabware?: boolean
6870
}
6971
interface BaseDeckProps {
7072
deckConfig: DeckConfiguration
@@ -240,6 +242,7 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element {
240242
innerProps,
241243
moduleChildren,
242244
onLabwareClick,
245+
highlightLabware,
243246
}) => {
244247
const slotPosition = getPositionFromSlotId(
245248
moduleLocation.slotName,
@@ -266,6 +269,7 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element {
266269
inferModuleOrientationFromXCoordinate(slotPosition[0]) ===
267270
'left' && moduleModel === HEATERSHAKER_MODULE_V1
268271
}
272+
highlight={highlightLabware}
269273
/>
270274
) : null}
271275
{moduleChildren}
@@ -281,6 +285,7 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element {
281285
wellFill,
282286
missingTips,
283287
onLabwareClick,
288+
highlight,
284289
}) => {
285290
if (
286291
labwareLocation === 'offDeck' ||
@@ -308,6 +313,7 @@ export function BaseDeck(props: BaseDeckProps): JSX.Element {
308313
onLabwareClick={onLabwareClick}
309314
wellFill={wellFill ?? undefined}
310315
missingTips={missingTips}
316+
highlight={highlight}
311317
/>
312318
{labwareChildren}
313319
</g>

components/src/hardware-sim/Labware/labwareInternals/LabwareOutline.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export function LabwareOutline(props: LabwareOutlineProps): JSX.Element {
4646
<feGaussianBlur stdDeviation="6" />
4747
</filter>
4848
</defs>
49+
{/* TODO(bh, 2024-07-22): adjust gaussian blur for stacks */}
4950
<LabwareBorder
5051
borderThickness={1.5 * OUTLINE_THICKNESS_MM}
5152
xDimension={dimensions.xDimension}
@@ -56,7 +57,7 @@ export function LabwareOutline(props: LabwareOutlineProps): JSX.Element {
5657
ry="8"
5758
/>
5859
<LabwareBorder
59-
borderThickness={1.5 * OUTLINE_THICKNESS_MM}
60+
borderThickness={2.2 * OUTLINE_THICKNESS_MM}
6061
xDimension={dimensions.xDimension}
6162
yDimension={dimensions.yDimension}
6263
stroke={COLORS.blue50}

0 commit comments

Comments
 (0)