Skip to content

Commit ad3b067

Browse files
authored
fix(app): add animations for stacker intervention modals (#19059)
# Overview This replace the placeholders in stacker intervention modals with actual stacker animations.
1 parent 648a1a9 commit ad3b067

File tree

2 files changed

+12
-27
lines changed

2 files changed

+12
-27
lines changed

app/src/organisms/InterventionModal/StackerEmptyInterventionContent.tsx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import { css } from 'styled-components'
22

33
import {
4+
AnimationVideo,
45
BORDERS,
5-
Box,
6-
COLORS,
76
DIRECTION_COLUMN,
87
Flex,
9-
LegacyStyledText,
108
SPACING,
119
} from '@opentrons/components'
1210
import { useRunCurrentState } from '@opentrons/react-api-client'
@@ -15,6 +13,7 @@ import {
1513
getStackerLocationFromSlotName,
1614
} from '@opentrons/shared-data'
1715

16+
import EmptyHopper from '/app/assets/videos/error-recovery/FlexStacker_EmptyHopper.webm'
1817
import { InterventionInfo } from '/app/molecules/InterventionModal/InterventionContent'
1918

2019
import { InterventionCommandMessage } from './InterventionCommandMessage'
@@ -28,10 +27,7 @@ import type {
2827

2928
const STACKER_IMAGE_STYLE = css`
3029
flex-direction: ${DIRECTION_COLUMN};
31-
grid-gap: ${SPACING.spacing8};
32-
padding: ${SPACING.spacing16};
33-
background-color: ${COLORS.grey35};
34-
border-radius: ${BORDERS.lineBorder};
30+
border-radius: ${BORDERS.borderRadius16};
3531
`
3632

3733
export interface StackerEmptyInterventionProps {
@@ -95,12 +91,9 @@ export function StackerEmptyInterventionContent({
9591
/>
9692
</Flex>
9793
<Flex width="50%" css={STACKER_IMAGE_STYLE}>
98-
<Box margin="0 auto" width="100%">
99-
{/* TODO (chb, 04-30-2025): Replace this with proper empty content */}
100-
<LegacyStyledText as="p">
101-
{'Replace me with a Stacker Empty image/animation'}
102-
</LegacyStyledText>
103-
</Box>
94+
<AnimationVideo role="presentation" width="100%">
95+
<source src={EmptyHopper} data-testid="empty-animation" />
96+
</AnimationVideo>
10497
</Flex>
10598
</Flex>
10699
</Flex>

app/src/organisms/InterventionModal/StackerFillInterventionContent.tsx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import { useTranslation } from 'react-i18next'
22
import { css } from 'styled-components'
33

44
import {
5+
AnimationVideo,
56
BORDERS,
6-
Box,
7-
COLORS,
87
DIRECTION_COLUMN,
98
Flex,
10-
LegacyStyledText,
119
SPACING,
1210
} from '@opentrons/components'
1311
import { useRunCurrentState } from '@opentrons/react-api-client'
@@ -16,6 +14,7 @@ import {
1614
getStackerLocationFromSlotName,
1715
} from '@opentrons/shared-data'
1816

17+
import FillHopper from '/app/assets/videos/error-recovery/FlexStacker_FillHopper.webm'
1918
import { InterventionInfo } from '/app/molecules/InterventionModal/InterventionContent'
2019

2120
import { InterventionCommandMessage } from './InterventionCommandMessage'
@@ -28,11 +27,7 @@ import type {
2827
} from '@opentrons/shared-data'
2928

3029
const STACKER_IMAGE_STYLE = css`
31-
flex-direction: ${DIRECTION_COLUMN};
32-
grid-gap: ${SPACING.spacing8};
33-
padding: ${SPACING.spacing16};
34-
background-color: ${COLORS.grey35};
35-
border-radius: ${BORDERS.lineBorder};
30+
border-radius: ${BORDERS.borderRadius16};
3631
`
3732

3833
export interface StackerFillInterventionProps {
@@ -103,12 +98,9 @@ export function StackerFillInterventionContent({
10398
/>
10499
</Flex>
105100
<Flex width="50%" css={STACKER_IMAGE_STYLE}>
106-
<Box margin="0 auto" width="100%">
107-
{/* TODO (chb, 04-30-2025): Replace this with proper fill content */}
108-
<LegacyStyledText as="p">
109-
{'Replace me with a Stacker Fill image/animation'}
110-
</LegacyStyledText>
111-
</Box>
101+
<AnimationVideo role="presentation" width="100%">
102+
<source src={FillHopper} data-testid="fill-animation" />
103+
</AnimationVideo>
112104
</Flex>
113105
</Flex>
114106
</Flex>

0 commit comments

Comments
 (0)