Skip to content

Commit 8da047a

Browse files
committed
refactor highlight logic lower down in components
1 parent 4439375 commit 8da047a

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

components/src/hardware-sim/Labware/LabwareRender.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ export interface LabwareRenderProps {
6161
onLabwareClick?: () => void
6262
showBorder?: boolean
6363
strokeColor?: string
64-
canHighlightLabels?: boolean
6564
}
6665

6766
export const LabwareRender = (props: LabwareRenderProps): JSX.Element => {
@@ -167,7 +166,6 @@ export const LabwareRender = (props: LabwareRenderProps): JSX.Element => {
167166
wellLabelOption={props.wellLabelOption}
168167
wellLabelColor={props.wellLabelColor}
169168
highlightedWellLabels={props.highlightedWellLabels}
170-
canHighlightLabels={props.canHighlightLabels}
171169
/>
172170
) : null}
173171
</g>

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ export interface WellLabelsProps {
1919
wellLabelOption: WellLabelOption
2020
highlightedWellLabels?: HighlightedWellLabels
2121
wellLabelColor?: string
22-
canHighlightLabels?: boolean
2322
}
2423

2524
const Labels = (props: {
@@ -29,14 +28,8 @@ const Labels = (props: {
2928
isLetterColumn?: boolean
3029
highlightedWellLabels?: HighlightedWellLabels
3130
wellLabelColor?: string
32-
canHighlightLabels?: boolean
3331
}): JSX.Element => {
34-
const {
35-
wellLabelOption,
36-
highlightedWellLabels,
37-
wellLabelColor,
38-
canHighlightLabels,
39-
} = props
32+
const { wellLabelOption, highlightedWellLabels, wellLabelColor } = props
4033
const highlightColor = highlightedWellLabels?.color ?? C_BLUE
4134
const fillColor = wellLabelColor ?? C_BLACK
4235
const LETTER_COLUMN_X =
@@ -80,7 +73,7 @@ const Labels = (props: {
8073
? highlightColor
8174
: fillColor
8275
}
83-
canHighlight={canHighlightLabels}
76+
canHighlight={false}
8477
>
8578
{(props.isLetterColumn === true ? /[A-Z]+/g : /\d+/g).exec(
8679
wellName
@@ -98,7 +91,6 @@ export function WellLabelsComponent(props: WellLabelsProps): JSX.Element {
9891
wellLabelOption,
9992
highlightedWellLabels,
10093
wellLabelColor,
101-
canHighlightLabels,
10294
} = props
10395
const letterColumn = definition.ordering[0] ?? []
10496
const numberRow = definition.ordering.map(wellCol => wellCol[0])
@@ -112,15 +104,13 @@ export function WellLabelsComponent(props: WellLabelsProps): JSX.Element {
112104
highlightedWellLabels={highlightedWellLabels}
113105
wellLabelColor={wellLabelColor}
114106
isLetterColumn
115-
canHighlightLabels={canHighlightLabels}
116107
/>
117108
<Labels
118109
definition={definition}
119110
wells={numberRow}
120111
wellLabelOption={wellLabelOption}
121112
highlightedWellLabels={highlightedWellLabels}
122113
wellLabelColor={wellLabelColor}
123-
canHighlightLabels={canHighlightLabels}
124114
/>
125115
</g>
126116
)

protocol-designer/src/components/labware/SelectableLabware.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ export const SelectableLabware = (props: Props): JSX.Element => {
229229
)(event)
230230
}
231231
}}
232-
canHighlightLabels={false}
233232
/>
234233
)}
235234
</WellTooltip>

0 commit comments

Comments
 (0)