Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): Labware List Item responsiveness and stacking order #15982

Merged
merged 2 commits into from
Aug 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import type { NestedLabwareInfo } from './getNestedLabwareInfo'

const LabwareRow = styled.div`
display: grid;
grid-template-columns: 1fr 6fr 5.9fr;
grid-template-columns: 90px 12fr;
border-style: ${BORDERS.styleSolid};
border-width: 1px;
border-color: ${COLORS.grey30};
Expand Down Expand Up @@ -268,7 +268,7 @@ export function LabwareListItem(

return (
<LabwareRow>
<Flex alignItems={ALIGN_CENTER} width="80px" gridGap={SPACING.spacing2}>
<Flex alignItems={ALIGN_CENTER} gridGap={SPACING.spacing2}>
{slotInfo != null && isFlex ? (
<DeckInfoLabel deckLabel={slotInfo} />
) : (
Expand All @@ -283,31 +283,10 @@ export function LabwareListItem(
<DeckInfoLabel iconName="stacked" />
) : null}
</Flex>
<Flex
flexDirection={DIRECTION_COLUMN}
gridGap={SPACING.spacing16}
width="45.875rem"
>
<Flex>
{showLabwareSVG && <StandaloneLabware definition={definition} />}
<Flex
flexDirection={DIRECTION_COLUMN}
justifyContent={JUSTIFY_CENTER}
marginLeft={SPACING.spacing8}
marginRight={SPACING.spacing24}
>
<StyledText desktopStyle="bodyDefaultSemiBold">
{labwareDisplayName}
</StyledText>
<StyledText desktopStyle="bodyDefaultRegular" color={COLORS.grey60}>
{nickName}
</StyledText>
</Flex>
</Flex>
<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing16}>
{nestedLabwareInfo != null &&
nestedLabwareInfo?.sharedSlotId === slotInfo ? (
<>
<Divider />
<Flex>
<Flex
flexDirection={DIRECTION_COLUMN}
Expand All @@ -326,8 +305,27 @@ export function LabwareListItem(
</StyledText>
</Flex>
</Flex>
<Divider />
</>
) : null}
<Flex>
{showLabwareSVG ? (
<StandaloneLabware definition={definition} />
) : null}
<Flex
flexDirection={DIRECTION_COLUMN}
justifyContent={JUSTIFY_CENTER}
marginLeft={SPACING.spacing8}
marginRight={SPACING.spacing24}
>
<StyledText desktopStyle="bodyDefaultSemiBold">
{labwareDisplayName}
</StyledText>
<StyledText desktopStyle="bodyDefaultRegular" color={COLORS.grey60}>
{nickName}
</StyledText>
</Flex>
</Flex>
{moduleDisplayName != null ? (
<>
<Divider />
Expand Down
Loading