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

feat(protocol-designer): export and announcement modal for PD 8.1 #14870

Merged
merged 5 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion protocol-designer/cypress/integration/migrations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ describe('Protocol fixtures migrate and match snapshots', () => {

cy.get('div')
.contains(
'This protocol can only run on app and robot server version 7.1 or higher'
'This protocol can only run on app and robot server version 7.2.0 or higher'
)
.should('exist')
cy.get('button').contains('continue', { matchCase: false }).click()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ export function v8WarningContent(t: any): JSX.Element {
return (
<div>
<p>
{t(`hint.export_v8_protocol_7_1.body1`)}{' '}
<strong>{t(`hint.export_v8_protocol_7_1.body2`)}</strong>
{t(`hint.export_v8_protocol_7_1.body3`)}
{t(`hint.export_v8_1_protocol_7_2.body1`)}{' '}
<strong>{t(`hint.export_v8_1_protocol_7_2.body2`)}</strong>
{t(`hint.export_v8_1_protocol_7_2.body3`)}
</p>
</div>
)
Expand Down Expand Up @@ -350,7 +350,7 @@ export function FileSidebar(): JSX.Element {
content: React.ReactNode
} => {
return {
hintKey: 'export_v8_protocol_7_1',
hintKey: 'export_v8_1_protocol_7_2',
content: v8WarningContent(t),
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ describe('FileSidebar', () => {
vi.resetAllMocks()
cleanup()
})
it('renders the file sidebar and exports with blocking hint for exporting', () => {
vi.mocked(useBlockingHint).mockReturnValue(<div>mock blocking hint</div>)
render()
fireEvent.click(screen.getByRole('button', { name: 'Export' }))
expect(vi.mocked(useBlockingHint)).toHaveBeenCalled()
screen.getByText('mock blocking hint')
})
it('renders the file sidebar and buttons work as expected with no warning upon export', () => {
render()
screen.getByText('Protocol File')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,5 +265,39 @@ export const useAnnouncements = (): Announcement[] => {
</>
),
},
{
announcementKey: 'customParamsAndMultiTipAndModule8.1',
image: <Flex />,
heading: t('announcements.header', { pd: PD }),
message: (
<>
<p>
{t('announcements.customParamsAndMultiTipAndModule.body1', {
pd: PD,
})}
</p>
<ul>
<li>{t('announcements.customParamsAndMultiTipAndModule.body2')}</li>
<li>
<Trans
t={t}
i18nKey={'announcements.customParamsAndMultiTipAndModule.body3'}
components={{ i: <em /> }}
/>
</li>
<li>{t('announcements.customParamsAndMultiTipAndModule.body4')}</li>
<li>{t('announcements.customParamsAndMultiTipAndModule.body5')}</li>
</ul>
<p>
<Trans
t={t}
i18nKey={'announcements.customParamsAndMultiTipAndModule.body6'}
components={{ strong: <strong /> }}
values={{ app: APP }}
/>
</p>
</>
),
},
]
}
4 changes: 2 additions & 2 deletions protocol-designer/src/localization/en/alert.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"title": "Missing labware",
"body": "One or more module has no labware on it. We recommend you add labware before proceeding"
},
"export_v8_protocol_7_1": {
"export_v8_1_protocol_7_2": {
"title": "Robot and app update may be required",
"body1": "This protocol can only run on app and robot server version",
"body2": "7.1 or higher",
"body2": "7.2.0 or higher",
"body3": ". Please ensure your robot is updated to the correct version."
},
"change_magnet_module_model": {
Expand Down
8 changes: 8 additions & 0 deletions protocol-designer/src/localization/en/modal.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
"deckConfigAnd96Channel": {
"body1": "Introducing the {{pd}} 8.0 with deck configuration and 96-channel pipette support!",
"body2": "All protocols now require {{app}} version <strong> 7.1+ </strong> to run."
},
"customParamsAndMultiTipAndModule": {
"body1": "Introducing {{pd}} 8.1. Starting today, you will be able to:",
"body2": "Customize blowout speed and height.",
"body3": "Adjust horizontal position within a well when aspirating, dispensing, or mixing.",
"body4": "Assign up to three types of tip racks to a single pipette.",
"body5": "Add multiple Temperature Modules to the deck (Flex only).",
"body6": "All protocols require {{app}} version <strong>7.2.0 or later</strong> to run."
}
},
"labware_selection": {
Expand Down
3 changes: 2 additions & 1 deletion protocol-designer/src/tutorial/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type HintKey = // normal hints
| 'waste_chute_warning'
// blocking hints
| 'custom_labware_with_modules'
| 'export_v8_protocol_7_1'
| 'export_v8_1_protocol_7_2'
| 'change_magnet_module_model'
// DEPRECATED HINTS (keep a record to avoid name collisions with old persisted dismissal states)
// 'export_v4_protocol'
Expand All @@ -20,5 +20,6 @@ type HintKey = // normal hints
// | 'export_v6_protocol_6_10'
// | 'export_v6_protocol_6_20'
// | 'export_v7_protocol_7_0'
// | 'export_v8_protocol_7_1'
export { actions, rootReducer, selectors }
export type { RootState, HintKey }
Loading