From 2e54bb55c25ca3c3bedee8c534aa1ff231a131c0 Mon Sep 17 00:00:00 2001 From: Jethary Date: Thu, 11 Apr 2024 10:30:40 -0400 Subject: [PATCH 1/5] add announcement key --- .../AnnouncementModal/announcements.tsx | 38 +++++++++++++++++++ .../src/localization/en/modal.json | 8 ++++ 2 files changed, 46 insertions(+) diff --git a/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx b/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx index aab430bf549..237bbf12a94 100644 --- a/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx +++ b/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx @@ -265,5 +265,43 @@ export const useAnnouncements = (): Announcement[] => { ), }, + { + announcementKey: 'customParamsAndMultiTipAndModule8.1', + image: ( + // TODO(jr, 4/11/24): add image to announcement modal + + ), + heading: t('announcements.header', { pd: PD }), + message: ( + <> +

+ {t('announcements.customParamsAndMultiTipAndModule.body1', { + pd: PD, + })} +

+ +

+ }} + values={{ app: APP }} + /> +

+ + ), + }, ] } diff --git a/protocol-designer/src/localization/en/modal.json b/protocol-designer/src/localization/en/modal.json index a07cb3b1310..12956b3fe69 100644 --- a/protocol-designer/src/localization/en/modal.json +++ b/protocol-designer/src/localization/en/modal.json @@ -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 7.1+ 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 'x' and 'y' 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 7.2+ to run." } }, "labware_selection": { From 2d426750f35dc898a3c9ac898243be2b23a482f6 Mon Sep 17 00:00:00 2001 From: Jethary Date: Thu, 11 Apr 2024 11:19:41 -0400 Subject: [PATCH 2/5] add export modal info --- .../src/components/FileSidebar/FileSidebar.tsx | 8 ++++---- protocol-designer/src/localization/en/alert.json | 4 ++-- protocol-designer/src/tutorial/index.ts | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/protocol-designer/src/components/FileSidebar/FileSidebar.tsx b/protocol-designer/src/components/FileSidebar/FileSidebar.tsx index e05a80e3163..31bdfa60723 100644 --- a/protocol-designer/src/components/FileSidebar/FileSidebar.tsx +++ b/protocol-designer/src/components/FileSidebar/FileSidebar.tsx @@ -237,9 +237,9 @@ export function v8WarningContent(t: any): JSX.Element { return (

- {t(`hint.export_v8_protocol_7_1.body1`)}{' '} - {t(`hint.export_v8_protocol_7_1.body2`)} - {t(`hint.export_v8_protocol_7_1.body3`)} + {t(`hint.export_v8_1_protocol_7_2.body1`)}{' '} + {t(`hint.export_v8_1_protocol_7_2.body2`)} + {t(`hint.export_v8_1_protocol_7_2.body3`)}

) @@ -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), } } diff --git a/protocol-designer/src/localization/en/alert.json b/protocol-designer/src/localization/en/alert.json index 4548d19e57c..be753e52b8a 100644 --- a/protocol-designer/src/localization/en/alert.json +++ b/protocol-designer/src/localization/en/alert.json @@ -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": { diff --git a/protocol-designer/src/tutorial/index.ts b/protocol-designer/src/tutorial/index.ts index 58a0f522c60..ecc17f49bb4 100644 --- a/protocol-designer/src/tutorial/index.ts +++ b/protocol-designer/src/tutorial/index.ts @@ -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' @@ -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 } From 7a4ad03a906ac7837da06f12d418960e43e23353 Mon Sep 17 00:00:00 2001 From: Jethary Date: Thu, 11 Apr 2024 12:02:51 -0400 Subject: [PATCH 3/5] feat(protocol-designer): export and announcement modal for PD 8.1 closes AUTH-8 AUTH-9 --- .../components/FileSidebar/__tests__/FileSidebar.test.tsx | 7 +++++++ .../components/modals/AnnouncementModal/announcements.tsx | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/protocol-designer/src/components/FileSidebar/__tests__/FileSidebar.test.tsx b/protocol-designer/src/components/FileSidebar/__tests__/FileSidebar.test.tsx index a9d2978b981..827af5a2aa8 100644 --- a/protocol-designer/src/components/FileSidebar/__tests__/FileSidebar.test.tsx +++ b/protocol-designer/src/components/FileSidebar/__tests__/FileSidebar.test.tsx @@ -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(
mock blocking hint
) + 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') diff --git a/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx b/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx index 237bbf12a94..81e549406d3 100644 --- a/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx +++ b/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx @@ -269,7 +269,7 @@ export const useAnnouncements = (): Announcement[] => { announcementKey: 'customParamsAndMultiTipAndModule8.1', image: ( // TODO(jr, 4/11/24): add image to announcement modal - + ), heading: t('announcements.header', { pd: PD }), message: ( From 1dfd42141a065da549f99ea584dac7105cda6ca1 Mon Sep 17 00:00:00 2001 From: Jethary Date: Thu, 11 Apr 2024 13:54:00 -0400 Subject: [PATCH 4/5] fix cypress --- protocol-designer/cypress/integration/migrations.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol-designer/cypress/integration/migrations.spec.js b/protocol-designer/cypress/integration/migrations.spec.js index 6c1d01a0ee7..8387f89f259 100644 --- a/protocol-designer/cypress/integration/migrations.spec.js +++ b/protocol-designer/cypress/integration/migrations.spec.js @@ -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() From 22e46885e3fb97af94b3ce831de69c6729f8383e Mon Sep 17 00:00:00 2001 From: Jethary Date: Thu, 11 Apr 2024 14:19:51 -0400 Subject: [PATCH 5/5] update copy --- .../cypress/integration/migrations.spec.js | 2 +- .../modals/AnnouncementModal/announcements.tsx | 6 +----- protocol-designer/src/localization/en/alert.json | 2 +- protocol-designer/src/localization/en/modal.json | 12 ++++++------ 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/protocol-designer/cypress/integration/migrations.spec.js b/protocol-designer/cypress/integration/migrations.spec.js index 8387f89f259..303c7b91701 100644 --- a/protocol-designer/cypress/integration/migrations.spec.js +++ b/protocol-designer/cypress/integration/migrations.spec.js @@ -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.2 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() diff --git a/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx b/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx index 81e549406d3..b10c6d75407 100644 --- a/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx +++ b/protocol-designer/src/components/modals/AnnouncementModal/announcements.tsx @@ -267,10 +267,7 @@ export const useAnnouncements = (): Announcement[] => { }, { announcementKey: 'customParamsAndMultiTipAndModule8.1', - image: ( - // TODO(jr, 4/11/24): add image to announcement modal - - ), + image: , heading: t('announcements.header', { pd: PD }), message: ( <> @@ -282,7 +279,6 @@ export const useAnnouncements = (): Announcement[] => {
  • {t('announcements.customParamsAndMultiTipAndModule.body2')}
  • - {' '} 7.1+ 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 'x' and 'y' 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 7.2+ 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 7.2.0 or later to run." } }, "labware_selection": {