Skip to content

Commit c06f748

Browse files
authored
feat(app): update and add new setup modal links and QR codes (#21728)
Add or update setup instruction links and corresponding QR codes for all modules with setup docs pages. Also, update and generalize the modal body copy for desktop module setup instructions modal. The full list of modules that should expose menu buttons to open the module setup modal, and in turn QR codes and links to direct to the correct [docs](https://docs.opentrons.com/modules/) is: 1. absorbance reader 2. stacker 3. vacuum 4. thermocycler 5. heater shaker 6. temperature Closes EXEC-2366
1 parent 47cf667 commit c06f748

12 files changed

Lines changed: 43 additions & 43 deletions
16.3 KB
Loading
51 KB
Loading
17 KB
Loading
51.9 KB
Loading
51.6 KB
Loading

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"secure_labware_explanation_magnetic_module": "<block>Opentrons recommends ensuring your labware locks to the Magnetic Module by adjusting the black plate bracket on top of the module.</block> <block>There are two sizes of plate brackets supplied with your module: standard and deep well. These brackets can be removed and swapped by unscrewing the module's thumb screw (the silver knob on the front).</block>",
8585
"secure_labware_explanation_thermocycler": "Opentrons recommends securing your labware to the Thermocycler Module by closing its latch. Doing so ensures level and accurate plate placement for optimal results.",
8686
"send_a_protocol_to_store": "Send a protocol from the Opentrons App to get started.",
87-
"setup_instructions_description": "For step-by-step instructions on setting up your module, consult the Quickstart Guide that came in its box or scan the QR code to visit the modules section of the Opentrons Help Center.",
87+
"setup_instructions_description": "Follow the step-by-step setup instructions in the module’s manual. Scan the QR code or click the link below to view it on the Opentrons documentation website.",
8888
"share_app_analytics": "Share App Analytics with Opentrons",
8989
"share_app_analytics_description": "Help Opentrons improve its products and services by automatically sending anonymous diagnostics and usage data.",
9090
"share_display_usage_description": "Data on how you interact with the touchscreen on Flex.",

app/src/organisms/ModuleCard/ModuleSetupModal.tsx

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,31 @@ import {
1919
ABSORBANCE_READER_TYPE,
2020
FLEX_STACKER_MODULE_TYPE,
2121
getModuleType,
22+
HEATERSHAKER_MODULE_TYPE,
23+
TEMPERATURE_MODULE_TYPE,
24+
THERMOCYCLER_MODULE_TYPE,
2225
VACUUM_MODULE_TYPE,
2326
} from '@opentrons/shared-data'
2427

2528
import { getTopPortalEl } from '/app/App/portal'
2629
import absorbanceReaderManualQRCode from '/app/assets/images/absorbance_reader_instruction_manual_code.png'
30+
import heaterShakerManualQRCode from '/app/assets/images/heatershaker_setup_instructions_qr.png'
2731
import helpCenterQRCode from '/app/assets/images/module_instruction_code.png'
2832
import stackerInstallationQRCode from '/app/assets/images/stacker_installation_qr.png'
33+
import temperatureManualQRCode from '/app/assets/images/temperature_setup_instructions_qr.png'
34+
import thermocyclerManualQRCode from '/app/assets/images/thermocycler_setup_instructions_qr.png'
2935
import vacuumModuleManualQRCode from '/app/assets/images/vacuum_setup_instructions_qr.png'
3036

3137
import type { ModuleModel } from '@opentrons/shared-data'
3238

33-
const MODULE_SETUP_URL = 'https://support.opentrons.com/s/modules'
39+
const MODULE_SETUP_URL = 'https://docs.opentrons.com/modules'
3440
const ABSORBANCE_READER_MANUAL_URL =
35-
'https://insights.opentrons.com/hubfs/Absorbance%20Plate%20Reader%20Instruction%20Manual.pdf'
36-
const FLEX_STACKER_INSTALL_DOCS_URL =
37-
'https://docs.opentrons.com/stacker/installation/'
38-
// TODO: add vacuum module manual url
39-
const VACUUM_MODULE_MANUAL_URL = 'https://docs.opentrons.com/modules/'
40-
41+
'https://docs.opentrons.com/absorbance-plate-reader/'
42+
const FLEX_STACKER_INSTALL_DOCS_URL = 'https://docs.opentrons.com/stacker/'
43+
const VACUUM_MANUAL_URL = 'https://docs.opentrons.com/vacuum/'
44+
const THERMOCYCLER_MANUAL_URL = 'https://docs.opentrons.com/thermocycler/'
45+
const HEATERSHAKER_MANUAL_URL = 'https://docs.opentrons.com/heater-shaker/'
46+
const TEMPERATURE_MANUAL_URL = 'https://docs.opentrons.com/temperature-module/'
4147
interface ModuleSetupModalProps {
4248
close: () => void
4349
moduleDisplayName: string
@@ -53,25 +59,6 @@ export const ModuleSetupModal = (props: ModuleSetupModalProps): JSX.Element => {
5359
'device_details',
5460
])
5561

56-
const instructionText = (): string => {
57-
const moduleType = getModuleType(moduleModel)
58-
switch (moduleType) {
59-
case ABSORBANCE_READER_TYPE:
60-
return t('module_instructions_manual')
61-
case FLEX_STACKER_MODULE_TYPE:
62-
return t('module_instructions_quickstart', {
63-
moduleName: t('device_details:stacker'),
64-
})
65-
case VACUUM_MODULE_TYPE:
66-
return t('module_instructions_quickstart', {
67-
moduleName: t('device_details:vacuum_module'),
68-
})
69-
default:
70-
// Legacy module instructions direct user to the help center instead of the quickstart guide
71-
return t('branded:modal_instructions')
72-
}
73-
}
74-
7562
const instructionURL = (): string => {
7663
const moduleType = getModuleType(moduleModel)
7764
switch (moduleType) {
@@ -80,7 +67,13 @@ export const ModuleSetupModal = (props: ModuleSetupModalProps): JSX.Element => {
8067
case FLEX_STACKER_MODULE_TYPE:
8168
return FLEX_STACKER_INSTALL_DOCS_URL
8269
case VACUUM_MODULE_TYPE:
83-
return VACUUM_MODULE_MANUAL_URL
70+
return VACUUM_MANUAL_URL
71+
case THERMOCYCLER_MODULE_TYPE:
72+
return THERMOCYCLER_MANUAL_URL
73+
case HEATERSHAKER_MODULE_TYPE:
74+
return HEATERSHAKER_MANUAL_URL
75+
case TEMPERATURE_MODULE_TYPE:
76+
return TEMPERATURE_MANUAL_URL
8477
default:
8578
return MODULE_SETUP_URL
8679
}
@@ -94,6 +87,12 @@ export const ModuleSetupModal = (props: ModuleSetupModalProps): JSX.Element => {
9487
return stackerInstallationQRCode
9588
case VACUUM_MODULE_TYPE:
9689
return vacuumModuleManualQRCode
90+
case THERMOCYCLER_MODULE_TYPE:
91+
return thermocyclerManualQRCode
92+
case HEATERSHAKER_MODULE_TYPE:
93+
return heaterShakerManualQRCode
94+
case TEMPERATURE_MODULE_TYPE:
95+
return temperatureManualQRCode
9796
default:
9897
return helpCenterQRCode
9998
}
@@ -113,7 +112,7 @@ export const ModuleSetupModal = (props: ModuleSetupModalProps): JSX.Element => {
113112
width="50%"
114113
>
115114
<LegacyStyledText forwardedAs="p" marginBottom={SPACING.spacing16}>
116-
{instructionText()}
115+
{t('branded:setup_instructions_description')}
117116
</LegacyStyledText>
118117
<Link
119118
external

app/src/organisms/ModuleCard/__tests__/ModuleSetupModal.test.tsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('ModuleSetupModal', () => {
3939
it('should render the correct body', () => {
4040
render(props)
4141
screen.getByText(
42-
'For step-by-step instructions on setting up your module, consult the Quickstart Guide that came in its box. You can also click the link below or scan the QR code to visit the modules section of the Opentrons Help Center.'
42+
'Follow the step-by-step setup instructions in the module’s manual. Scan the QR code or click the link below to view it on the Opentrons documentation website.'
4343
)
4444
})
4545
it('should render a link to the learn more page', () => {
@@ -50,7 +50,7 @@ describe('ModuleSetupModal', () => {
5050
name: 'mockModuleDisplayName setup instructions',
5151
})
5252
.getAttribute('href')
53-
).toBe('https://support.opentrons.com/s/modules')
53+
).toBe('https://docs.opentrons.com/temperature-module/')
5454
})
5555
it('should call close when the close button is pressed', () => {
5656
render(props)
@@ -66,17 +66,15 @@ describe('ModuleSetupModal', () => {
6666
}
6767
render(props)
6868
screen.getByText(
69-
'For step-by-step instructions on setting up your module, consult the Quickstart Guide that came in its box. You can also click the link below or scan the QR code to read the module Instruction Manual.'
69+
'Follow the step-by-step setup instructions in the module’s manual. Scan the QR code or click the link below to view it on the Opentrons documentation website.'
7070
)
7171
expect(
7272
screen
7373
.getByRole('link', {
7474
name: 'mockModuleDisplayName setup instructions',
7575
})
7676
.getAttribute('href')
77-
).toBe(
78-
'https://insights.opentrons.com/hubfs/Absorbance%20Plate%20Reader%20Instruction%20Manual.pdf'
79-
)
77+
).toBe('https://docs.opentrons.com/absorbance-plate-reader/')
8078
})
8179
it('should render variable copy and link if flex stacker', () => {
8280
props = {
@@ -85,14 +83,14 @@ describe('ModuleSetupModal', () => {
8583
}
8684
render(props)
8785
screen.getByText(
88-
'For step-by-step instructions on setting up your module, consult the Quickstart Guide that came in its box. You can also click the link below or scan the QR code to see the Stacker Quickstart guide.'
86+
'Follow the step-by-step setup instructions in the module’s manual. Scan the QR code or click the link below to view it on the Opentrons documentation website.'
8987
)
9088
expect(
9189
screen
9290
.getByRole('link', {
9391
name: 'mockModuleDisplayName setup instructions',
9492
})
9593
.getAttribute('href')
96-
).toBe('https://docs.opentrons.com/stacker/installation/')
94+
).toBe('https://docs.opentrons.com/stacker/')
9795
})
9896
})

app/src/organisms/ModuleCard/hooks.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ export function useModuleOverflowMenu(
392392
: t('open_lid'),
393393
isSettingDisabled: isDisabled,
394394
isSecondary: false,
395-
menuButtons: [thermoSetBlockTempBtn, aboutModuleBtn],
395+
menuButtons: [thermoSetBlockTempBtn, aboutModuleBtn, setupBtn],
396396
onClick: controlTCLid,
397397
},
398398
],
@@ -405,7 +405,7 @@ export function useModuleOverflowMenu(
405405
: t('overflow_menu_mod_temp'),
406406
isSecondary: false,
407407
isSettingDisabled: isDisabled,
408-
menuButtons: [aboutModuleBtn],
408+
menuButtons: [aboutModuleBtn, setupBtn],
409409
onClick:
410410
module.data.status !== 'idle'
411411
? () => {
@@ -468,7 +468,7 @@ export function useModuleOverflowMenu(
468468
setSetting: t('overflow_menu_about'),
469469
isSecondary: false,
470470
isSettingDisabled: false,
471-
menuButtons: [],
471+
menuButtons: [setupBtn],
472472
onClick: handleAboutClick,
473473
},
474474
],

app/src/organisms/ModuleCard/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ const HAS_SETUP_INSTRUCTIONS_TYPE: ModuleType[] = [
9999
FLEX_STACKER_MODULE_TYPE,
100100
HEATERSHAKER_MODULE_TYPE,
101101
VACUUM_MODULE_TYPE,
102+
THERMOCYCLER_MODULE_TYPE,
103+
TEMPERATURE_MODULE_TYPE,
104+
ABSORBANCE_READER_TYPE,
102105
]
103106

104107
const POLL_INTERVAL_MS = 5000

0 commit comments

Comments
 (0)