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 4 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 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,43 @@ export const useAnnouncements = (): Announcement[] => {
</>
),
},
{
announcementKey: 'customParamsAndMultiTipAndModule8.1',
image: (
// TODO(jr, 4/11/24): add image to announcement modal
Copy link
Collaborator Author

@jerader jerader Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i actually don't know if we need/want an image here so i'll revisit it later when Felix has signed off on PD 8.1

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of text, and no obvious associated visual. Skipping seems fine to me.

<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 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 the {{pd}} 8.1. Starting today, you will be able to:",
"body2": "Customize blowout flowRate speed and height",
"body3": "Customize aspirate, dispense, and mix <i>'x'</i> and <i>'y'</i> well positioning",
"body4": "Assign up to 3 types of tipracks to a single pipette",
"body5": "For the Flex only; add up to 7 Temperature Modules on the deck at the same time",
"body6": "All protocols require {{app}} version <strong> 7.2+ </strong> to run."
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you review the copy here when you have a minute @ecormany?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"body1": "Introducing the {{pd}} 8.1. Starting today, you will be able to:",
"body2": "Customize blowout flowRate speed and height",
"body3": "Customize aspirate, dispense, and mix <i>'x'</i> and <i>'y'</i> well positioning",
"body4": "Assign up to 3 types of tipracks to a single pipette",
"body5": "For the Flex only; add up to 7 Temperature Modules on the deck at the same time",
"body6": "All protocols require {{app}} version <strong> 7.2+ </strong> to run."
"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."

Double-check me: is it 7.2.0 for the required robot software?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are pipette collision logic updates that were added in App 7.2.0 that will be mirrored in PD 8.1. Otherwise, all the added functionality in this release has been supported in App prior to App 7.2.0

}
},
"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