Skip to content

Commit

Permalink
fix(app): DQA for pipette detach flow [RAUT-420] (#12974)
Browse files Browse the repository at this point in the history
* Add ODD round corners to LegacyModal and update stories that used it [RAUT-420]

* Update spacing on GenericWizardTile and maximize animation size [RAUT-420]
  • Loading branch information
ewagoner authored Jun 28, 2023
1 parent fc667aa commit 5d47a9c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from '@opentrons/components'
import { StyledText } from '../../atoms/text'
import { Skeleton } from '../../atoms/Skeleton'
import { ModalShell } from '../Modal'
import { LegacyModalShell } from '../LegacyModal'
import { WizardHeader } from '../WizardHeader'
import { GenericWizardTile } from './index'

Expand All @@ -21,10 +21,10 @@ export default {
const Template: Story<
React.ComponentProps<typeof GenericWizardTile>
> = args => (
<ModalShell>
<LegacyModalShell>
<WizardHeader currentStep={3} totalSteps={4} title="Example Title" />
<GenericWizardTile {...args} />
</ModalShell>
</LegacyModalShell>
)
const body = (
<StyledText as="p">
Expand Down
12 changes: 6 additions & 6 deletions app/src/molecules/GenericWizardTile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useSelector } from 'react-redux'
import styled, { css } from 'styled-components'
import { useTranslation } from 'react-i18next'
import {
ALIGN_CENTER,
DIRECTION_COLUMN,
Flex,
SPACING,
Expand All @@ -11,7 +12,6 @@ import {
TYPOGRAPHY,
COLORS,
Btn,
ALIGN_FLEX_END,
JUSTIFY_FLEX_END,
JUSTIFY_START,
JUSTIFY_CENTER,
Expand Down Expand Up @@ -64,7 +64,7 @@ const TILE_CONTAINER_STYLE = css`
padding: ${SPACING.spacing32};
height: 24.625rem;
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
height: 30rem;
height: 29.5rem;
}
`
export interface GenericWizardTileProps {
Expand Down Expand Up @@ -114,20 +114,20 @@ export function GenericWizardTile(props: GenericWizardTileProps): JSX.Element {

return (
<Flex css={TILE_CONTAINER_STYLE}>
<Flex flexDirection={DIRECTION_ROW} gridGap={SPACING.spacing40}>
<Flex flexDirection={DIRECTION_ROW} gridGap={SPACING.spacing24}>
<Flex
flexDirection={DIRECTION_COLUMN}
flex="1"
gridGap={SPACING.spacing16}
gridGap={SPACING.spacing8}
>
{typeof header === 'string' ? <Title>{header}</Title> : header}
{bodyText}
<StyledText as="p">{bodyText}</StyledText>
</Flex>
<Flex flex="1" justifyContent={JUSTIFY_CENTER}>
{rightHandBody}
</Flex>
</Flex>
<Flex justifyContent={buttonPositioning} alignItems={ALIGN_FLEX_END}>
<Flex justifyContent={buttonPositioning} alignItems={ALIGN_CENTER}>
{back != null ? (
<Btn onClick={back} disabled={backIsDisabled} aria-label="back">
<StyledText
Expand Down
3 changes: 3 additions & 0 deletions app/src/molecules/LegacyModal/LegacyModalShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ const ModalArea = styled.div<
box-shadow: ${BORDERS.smallDropShadow};
height: ${({ isFullPage }) => (isFullPage ? '100%' : 'auto')};
background-color: ${COLORS.white};
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} {
border-radius: ${BORDERS.borderRadiusSize4};
}
${styleProps};
`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import { COLORS, PrimaryButton } from '@opentrons/components'
import { ModalShell } from '../Modal'
import { LegacyModalShell } from '../LegacyModal'
import { WizardHeader } from '../WizardHeader'
import { SimpleWizardBody } from './index'

Expand All @@ -12,10 +12,10 @@ export default {
} as Meta

const Template: Story<React.ComponentProps<typeof SimpleWizardBody>> = args => (
<ModalShell>
<LegacyModalShell>
<WizardHeader currentStep={3} totalSteps={4} title="Attach a pipette" />
<SimpleWizardBody {...args} />
</ModalShell>
</LegacyModalShell>
)

export const AlertIcon = Template.bind({})
Expand Down
4 changes: 2 additions & 2 deletions app/src/organisms/PipetteWizardFlows/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ export function getPipetteAnimations(
<video
css={css`
padding-top: ${SPACING.spacing4};
max-width: 100%;
max-height: ${section === SECTIONS.ATTACH_PROBE ||
width: 100%;
min-height: ${section === SECTIONS.ATTACH_PROBE ||
section === SECTIONS.DETACH_PROBE
? `20rem`
: `12rem`};
Expand Down

0 comments on commit 5d47a9c

Please sign in to comment.