Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Dec 18, 2024
1 parent f1250ce commit 3460d7d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
22 changes: 13 additions & 9 deletions components/src/hardware-sim/BaseDeck/WasteChuteFixture.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
import { DeckLabelSet } from '../../organisms'
import { SPACING, TYPOGRAPHY } from '../../ui-style-constants'
import { COLORS } from '../../helix-design-system'
import { blue50 } from '../../helix-design-system/colors'
import { RobotCoordsForeignObject } from '../Deck/RobotCoordsForeignObject'
import { SlotBase } from './SlotBase'
import type {
Expand All @@ -21,6 +20,11 @@ import type {
} from '@opentrons/shared-data'
import type { DeckLabelProps } from '../../molecules'

const WASTE_CHUTE_WIDTH = 130
const WASTE_CHUTE_HEIGHT = 138
const WASTE_CHUTE_X = 322
const WASTE_CHUTE_Y = -51
const TAG_HEIGHT = 28
interface WasteChuteFixtureProps extends React.SVGProps<SVGGElement> {
cutoutId: typeof WASTE_CHUTE_CUTOUT
deckDefinition: DeckDefinition
Expand Down Expand Up @@ -96,9 +100,9 @@ export function WasteChute(props: WasteChuteProps): JSX.Element {
return (
<>
<RobotCoordsForeignObject
width={130}
height={138}
x={322}
width={WASTE_CHUTE_WIDTH}
height={WASTE_CHUTE_HEIGHT}
x={WASTE_CHUTE_X}
y={-51}
flexProps={{ flex: '1' }}
foreignObjectProps={{ flex: '1' }}
Expand All @@ -113,7 +117,7 @@ export function WasteChute(props: WasteChuteProps): JSX.Element {
justifyContent={JUSTIFY_CENTER}
padding={SPACING.spacing8}
width="100%"
border={showHighlight ? `3px solid ${blue50}` : 'none'}
border={showHighlight ? `3px solid ${COLORS.blue50}` : 'none'}
>
<Icon name="trash" color={wasteIconColor} height="2rem" />
<Text
Expand All @@ -127,10 +131,10 @@ export function WasteChute(props: WasteChuteProps): JSX.Element {
</RobotCoordsForeignObject>
{tagInfo != null && tagInfo.length > 0 ? (
<DeckLabelSet
width={130}
height={138}
x={322}
y={-79}
width={WASTE_CHUTE_WIDTH}
height={WASTE_CHUTE_HEIGHT}
x={WASTE_CHUTE_X}
y={WASTE_CHUTE_Y - TAG_HEIGHT}
deckLabels={tagInfo}
/>
) : null}
Expand Down
3 changes: 1 addition & 2 deletions components/src/hardware-sim/Deck/FlexTrash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { Flex, Text } from '../../primitives'
import { ALIGN_CENTER, JUSTIFY_CENTER } from '../../styles'
import { SPACING, TYPOGRAPHY } from '../../ui-style-constants'
import { COLORS, BORDERS } from '../../helix-design-system'
import { blue50 } from '../../helix-design-system/colors'
import { RobotCoordsForeignObject } from './RobotCoordsForeignObject'

import type { RobotType } from '@opentrons/shared-data'
Expand Down Expand Up @@ -106,7 +105,7 @@ export const FlexTrash = ({
justifyContent={JUSTIFY_CENTER}
gridGap={SPACING.spacing8}
width="100%"
border={showHighlight ? `3px solid ${blue50}` : 'none'}
border={showHighlight ? `3px solid ${COLORS.blue50}` : 'none'}
>
{rotateDegrees === '180' ? (
<Text
Expand Down
14 changes: 5 additions & 9 deletions protocol-designer/src/molecules/DropdownStepFormField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export interface DropdownStepFormFieldProps extends FieldProps {
onExit?: () => void
}

const FIRST_FIELDS = ['aspirate_labware', 'labware', 'moduleId']
const SECOND_FIELDS = ['dispense_labware', 'newLocation']

export function DropdownStepFormField(
props: DropdownStepFormFieldProps
): JSX.Element {
Expand Down Expand Up @@ -55,21 +58,14 @@ export function DropdownStepFormField(
id: value,
text,
}
if (
fieldName === 'aspirate_labware' ||
fieldName === 'labware' ||
fieldName === 'moduleId'
) {
if (FIRST_FIELDS.includes(fieldName)) {
dispatch(
selectDropdownItem({
selection: { ...selection, field: '1' },
mode: 'add',
})
)
} else if (
fieldName === 'dispense_labware' ||
fieldName === 'newLocation'
) {
} else if (SECOND_FIELDS.includes(fieldName)) {
dispatch(
selectDropdownItem({
selection: { ...selection, field: '2' },
Expand Down

0 comments on commit 3460d7d

Please sign in to comment.