Skip to content

Commit 5722a1f

Browse files
authored
fix(protocol-designer): hyphen off-deck and fix hover (#18897)
closes RQA-4354
1 parent 4535c43 commit 5722a1f

File tree

4 files changed

+9
-21
lines changed

4 files changed

+9
-21
lines changed

protocol-designer/src/assets/localization/en/starting_deck_state.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
"num_liquid_plural": "{{count}} liquids",
5757
"num_liquid": "{{count}} liquid",
5858
"off_deck_labware": "Off-deck Labware",
59-
"off_deck_title": "Off deck",
60-
"offDeck": "Off deck",
59+
"off_deck_title": "Off-deck",
60+
"offDeck": "Off-deck",
6161
"onDeck": "On deck",
6262
"one_item": "No more than 1 {{hardware}} allowed on the deck at one time",
6363
"only_display_rec": "Only display recommended labware",

protocol-designer/src/pages/Designer/OffDeck/OffDeckDetails.tsx

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,14 @@ export function OffDeckDetails(props: OffDeckDetailsProps): JSX.Element {
6262
<Flex
6363
backgroundColor={COLORS.white}
6464
borderRadius={BORDERS.borderRadius12}
65-
width="100%"
66-
height="100%"
67-
padding={`${SPACING.spacing40} ${SPACING.spacing40} 0 ${SPACING.spacing40}`}
65+
padding={SPACING.spacing40}
6866
gridGap={SPACING.spacing24}
6967
alignItems={ALIGN_CENTER}
7068
justifyContent={JUSTIFY_FLEX_END}
7169
>
7270
<Flex
7371
flex="0 0 auto"
7472
width={OFF_DECK_MAP_WIDTH}
75-
height="100%"
7673
maxHeight={OFF_DECK_MAP_HEIGHT_FOR_STEP}
7774
minHeight={OFF_DECK_MAP_HEIGHT_FOR_STEP}
7875
alignItems={ALIGN_CENTER}
@@ -83,11 +80,7 @@ export function OffDeckDetails(props: OffDeckDetailsProps): JSX.Element {
8380
flexDirection={DIRECTION_COLUMN}
8481
gridGap={SPACING.spacing40}
8582
>
86-
<Flex
87-
justifyContent={JUSTIFY_CENTER}
88-
width="100%"
89-
color={COLORS.grey60}
90-
>
83+
<Flex justifyContent={JUSTIFY_CENTER} color={COLORS.grey60}>
9184
<StyledText desktopStyle="bodyDefaultSemiBold">
9285
{i18n.format(t('off_deck_labware'), 'upperCase')}
9386
</StyledText>
@@ -117,12 +110,7 @@ export function OffDeckDetails(props: OffDeckDetailsProps): JSX.Element {
117110
zDimension: dimensions.zDimension ?? 0,
118111
}
119112
return (
120-
<Flex
121-
id={lw.id}
122-
flexDirection={DIRECTION_COLUMN}
123-
key={lw.id}
124-
paddingBottom="0"
125-
>
113+
<Flex id={lw.id} flexDirection={DIRECTION_COLUMN} key={lw.id}>
126114
<RobotWorkSpace
127115
key={lw.id}
128116
viewBox={`${definition.cornerOffsetFromSlot.x} ${definition.cornerOffsetFromSlot.y} ${dimensions.xDimension} ${dimensions.yDimension}`}
@@ -181,7 +169,7 @@ export function OffDeckDetails(props: OffDeckDetailsProps): JSX.Element {
181169
</Flex>
182170
</Flex>
183171
{hoverSlot != null && terminalItemId === START_TERMINAL_ITEM_ID ? (
184-
<Flex width="100%" height="8rem">
172+
<Flex>
185173
<SlotDetailsContainer
186174
robotType={robotType}
187175
slot="offDeck"

protocol-designer/src/pages/Designer/ProtocolSteps/__tests__/ProtocolSteps.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describe('ProtocolSteps', () => {
129129
it('renders the toggle when formData is null', () => {
130130
render()
131131
screen.getByText('mock DeckSetupContainer')
132-
fireEvent.click(screen.getByText('Off deck'))
132+
fireEvent.click(screen.getByText('Off-deck'))
133133
screen.getByText('mock OffDeck')
134134
})
135135

protocol-designer/src/pages/ProtocolOverview/__tests__/StartingDeck.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ describe('StartingDeck', () => {
5656
screen.getByText('Protocol Starting Deck')
5757
screen.getByText('Materials list')
5858
screen.getByRole('button', { name: 'On deck' })
59-
screen.getByRole('button', { name: 'Off deck' })
59+
screen.getByRole('button', { name: 'Off-deck' })
6060
screen.getByText('mock DeckThumbnail')
6161
})
6262

6363
it('should render off deck when clicking toggle button', () => {
6464
render(props)
6565
screen.getByText('mock DeckThumbnail')
66-
fireEvent.click(screen.getByRole('button', { name: 'Off deck' }))
66+
fireEvent.click(screen.getByRole('button', { name: 'Off-deck' }))
6767
screen.getByText('mock OffDeckThumbnail')
6868
})
6969

0 commit comments

Comments
 (0)