Skip to content

Commit 127003a

Browse files
authored
fix(app): adjust module setup flow banner copy and animation size (#19036)
# Overview 1. Fix module setup flow banner text and style for stacker [closes RQA-4379] 2. Increase the size of installShuttle animation [closes RQA-4415]
1 parent ad3b067 commit 127003a

File tree

4 files changed

+37
-23
lines changed

4 files changed

+37
-23
lines changed

app/src/assets/localization/en/module_wizard_flows.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"installing_latest_firmware": "Installing latest firmware",
3838
"install_update": "Install update",
3939
"location_occupied": "A {{fixture}} is currently specified here on the deck configuration",
40+
"look_for_pulsing_lights": "Look for pulsing lights on the module that you are setting up",
4041
"module_added": "New module detected. Setup the module for use.",
4142
"module_attached_to_port": "New {{module}} attached to {{port}}!",
4243
"module_attached_multiple": "Multiple new modules detected. Which module do you want to setup?",
@@ -47,7 +48,7 @@
4748
"module_calibration": "Module calibration",
4849
"module_setup": "Module setup",
4950
"module_heating_or_cooling": "Module calibration cannot proceed while heating or cooling",
50-
"module_secured": "The module must be fully secured in its caddy and secured in the deck slot.",
51+
"module_secured": "The module must be fully secured in its caddy and secured in the deck slot",
5152
"module_too_hot": "Module is too hot to proceed to module setup",
5253
"move_gantry_to_front": "Move gantry to front",
5354
"next": "Next",
@@ -60,7 +61,8 @@
6061
"prepping_module": "Prepping {{module}} for module setup",
6162
"recalibrate": "Recalibrate",
6263
"select_location": "Select module location",
63-
"select_the_slot": "Select the slot where you installed the {{module}} on the deck map to the right. The location must be correct for successful calibration.",
64+
"select_the_slot": "Select the slot where you installed the {{module}} connected to {{port}}.",
65+
"location_must_be_correct": "The location must be correct for successful calibration.",
6466
"shuttle_install_fail": "Shuttle installed incorrectly",
6567
"shuttle_install_fail_description": "There was an issue with the install of the shuttle. Please try installing again or contact support.",
6668
"setup_another_module": "Setup another module",

app/src/organisms/ModuleWizardFlows/InstallShuttle.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,9 @@ export function InstallShuttle(props: InstallShuttleProps): JSX.Element {
109109
<GenericWizardTile
110110
header={i18n.format(t('place_shuttle'), 'capitalize')}
111111
rightHandBody={
112-
<Flex height="13.25rem" paddingTop={SPACING.spacing4}>
113-
<AnimationVideo
114-
css={css`
115-
max-width: 100%;
116-
max-height: 100%;
117-
`}
118-
>
119-
<source src={StackerInstallShuttle} />
120-
</AnimationVideo>
121-
</Flex>
112+
<AnimationVideo width="100%">
113+
<source src={StackerInstallShuttle} />
114+
</AnimationVideo>
122115
}
123116
bodyText={
124117
<>

app/src/organisms/ModuleWizardFlows/SelectLocation.tsx

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,18 @@ import isEqual from 'lodash/isEqual'
33
import { css } from 'styled-components'
44

55
import {
6-
Banner,
76
DeckConfigurator,
8-
LegacyStyledText,
7+
InlineNotification,
98
RESPONSIVENESS,
10-
SIZE_1,
11-
SPACING,
9+
StyledText,
1210
TYPOGRAPHY,
1311
} from '@opentrons/components'
1412
import { useUpdateDeckConfigurationMutation } from '@opentrons/react-api-client'
1513
import {
1614
FAKE_FIXTURE_IDS,
1715
FLEX_ROBOT_TYPE,
1816
FLEX_STACKER_FIXTURES,
17+
FLEX_STACKER_MODULE_TYPE,
1918
getAAForModuleFixture,
2019
getCutoutConfigReplacmentForModule,
2120
getCutoutFixturesForModuleModel,
@@ -32,6 +31,7 @@ import {
3231
SINGLE_SLOT_FIXTURES,
3332
} from '@opentrons/shared-data'
3433

34+
import { useModuleUSBPort } from '/app/local-resources/modules'
3535
import { GenericWizardTile } from '/app/molecules/GenericWizardTile'
3636

3737
import { getFixtureIdByCutoutId } from './getFixtureIdByCutoutId'
@@ -79,6 +79,10 @@ export function SelectLocation(props: SelectLocationProps): JSX.Element {
7979

8080
const { t } = useTranslation('module_wizard_flows')
8181
const moduleName = getModuleDisplayName(attachedModule.moduleModel)
82+
const { parseModuleUSBPort } = useModuleUSBPort()
83+
84+
const isFlexStacker = attachedModule.moduleType === FLEX_STACKER_MODULE_TYPE
85+
8286
const handleOnClick = (): void => {
8387
if (maintenanceRunId == null) {
8488
createMaintenanceRun({}).catch(error => {
@@ -229,12 +233,21 @@ export function SelectLocation(props: SelectLocationProps): JSX.Element {
229233
}
230234
bodyText={
231235
<>
232-
<LegacyStyledText css={BODY_STYLE}>
233-
{t('select_the_slot', { module: moduleName })}
234-
</LegacyStyledText>
235-
<Banner type="warning" size={SIZE_1} marginY={SPACING.spacing4}>
236-
{t('module_secured')}
237-
</Banner>
236+
<StyledText css={BODY_STYLE}>
237+
{t('select_the_slot', {
238+
module: moduleName,
239+
port: parseModuleUSBPort(attachedModule),
240+
})}
241+
{isFlexStacker ? null : ` ${t('location_must_be_correct')}`}
242+
</StyledText>
243+
{isFlexStacker ? (
244+
<InlineNotification
245+
type="neutral"
246+
message={t('look_for_pulsing_lights')}
247+
/>
248+
) : (
249+
<InlineNotification type="alert" message={t('module_secured')} />
250+
)}
238251
</>
239252
}
240253
proceedButtonText={t('confirm_location')}

app/src/organisms/ModuleWizardFlows/__tests__/SelectLocation.test.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,12 @@ const mockSimpleDeckConfig: CutoutConfig[] = [
8989
const attachedModule: Partial<AttachedModule> = {
9090
moduleModel: 'temperatureModuleV2',
9191
serialNumber: 'test123',
92+
usbPort: {
93+
path: '/dev/ot_module_tempdeck0',
94+
port: 1,
95+
hub: false,
96+
portGroup: 'unknown',
97+
},
9298
}
9399
const RUN_ID_1: string = 'mock_run_1'
94100
const mockUpdateDeckConfiguration = vi.fn()
@@ -137,7 +143,7 @@ describe('SelectLocation', () => {
137143
render(props)
138144
screen.getByText('Select module location')
139145
screen.getByText(
140-
'Select the slot where you installed the Temperature Module GEN2 on the deck map to the right. The location must be correct for successful calibration.'
146+
'Select the slot where you installed the Temperature Module GEN2 connected to USB-1. The location must be correct for successful calibration.'
141147
)
142148

143149
const confirmBtn = screen.getByText('Confirm location')

0 commit comments

Comments
 (0)