Skip to content

Commit 673a6cf

Browse files
committed
fix(protocol-designer): fix OffDeckDetails container
Refactors padding logic in PD OffDeckDetails outer container to align right with padding, rather than dynamically calculating left padding based on the presence of the details element. Closes RQA-3953
1 parent 8b833e7 commit 673a6cf

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

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

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
EmptySelectorButton,
1313
Flex,
1414
JUSTIFY_CENTER,
15+
JUSTIFY_FLEX_END,
1516
LabwareRender,
1617
OVERFLOW_AUTO,
1718
RobotWorkSpace,
@@ -59,27 +60,19 @@ export function OffDeckDetails(props: OffDeckDetailsProps): JSX.Element {
5960
)
6061
const containerWidth = tab === 'startingDeck' ? '100vw' : '75vw'
6162

62-
const paddingLeftWithHover =
63-
hoverSlot == null
64-
? `calc((${containerWidth} - (${SPACING.spacing24} * 2) - ${OFF_DECK_MAP_WIDTH}) / 2)`
65-
: SPACING.spacing24
66-
const paddingLeft = tab === 'startingDeck' ? paddingLeftWithHover : undefined
67-
const padding =
68-
tab === 'protocolSteps'
69-
? SPACING.spacing24
70-
: `${SPACING.spacing40} ${paddingLeft}`
7163
const stepDetailsContainerWidth = `calc(((${containerWidth} - ${OFF_DECK_MAP_WIDTH}) / 2) - (${SPACING.spacing24} * 3))`
64+
const paddingRight = `calc((100% - ${OFF_DECK_MAP_WIDTH}) / 2)`
7265

7366
return (
7467
<Flex
7568
backgroundColor={COLORS.white}
7669
borderRadius={BORDERS.borderRadius12}
7770
width="100%"
7871
height="100%"
79-
padding={padding}
72+
padding={`${SPACING.spacing24} ${paddingRight} ${SPACING.spacing24} 0`}
8073
gridGap={SPACING.spacing24}
8174
alignItems={ALIGN_CENTER}
82-
justifyContent={JUSTIFY_CENTER}
75+
justifyContent={JUSTIFY_FLEX_END}
8376
>
8477
{hoverSlot != null ? (
8578
<Flex width={stepDetailsContainerWidth} height="6.25rem">

0 commit comments

Comments
 (0)