From 91d38c16253ec28ac67bc86c98e91ff0a6e9b65a Mon Sep 17 00:00:00 2001 From: Jethary Date: Thu, 23 May 2024 15:38:26 -0400 Subject: [PATCH 1/3] fix(protocol-designer): candidate-C bug addressing and don't unnecessarily migrate closes RQA-2772 RQA-2773 RQA-2776 --- .../components/FileSidebar/utils/getUnusedTrash.ts | 14 +++++++++----- .../components/modals/CreateFileWizard/index.tsx | 1 + protocol-designer/src/load-file/migration/index.ts | 6 +++++- protocol-designer/src/step-forms/reducers/index.ts | 6 ++++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/protocol-designer/src/components/FileSidebar/utils/getUnusedTrash.ts b/protocol-designer/src/components/FileSidebar/utils/getUnusedTrash.ts index d88daf31145..5c97305c16b 100644 --- a/protocol-designer/src/components/FileSidebar/utils/getUnusedTrash.ts +++ b/protocol-designer/src/components/FileSidebar/utils/getUnusedTrash.ts @@ -38,13 +38,17 @@ export const getUnusedTrash = ( wasteChute != null ? commands?.some( command => - command.commandType === 'moveToAddressableArea' && - WASTE_CHUTE_ADDRESSABLE_AREAS.includes( - command.params.addressableAreaName as AddressableAreaName - ) + (command.commandType === 'moveToAddressableArea' && + WASTE_CHUTE_ADDRESSABLE_AREAS.includes( + command.params.addressableAreaName as AddressableAreaName + )) || + (command.commandType === 'moveLabware' && + command.params.newLocation !== 'offDeck' && + 'addressableAreaName' in command.params.newLocation && + command.params.newLocation.addressableAreaName === + 'gripperWasteChute') ) : null - return { trashBinUnused: trashBin != null && !hasTrashBinCommands, wasteChuteUnused: wasteChute != null && !hasWasteChuteCommands, diff --git a/protocol-designer/src/components/modals/CreateFileWizard/index.tsx b/protocol-designer/src/components/modals/CreateFileWizard/index.tsx index 6461d02e729..44cdbd77c78 100644 --- a/protocol-designer/src/components/modals/CreateFileWizard/index.tsx +++ b/protocol-designer/src/components/modals/CreateFileWizard/index.tsx @@ -121,6 +121,7 @@ export function CreateFileWizard(): JSX.Element | null { values.pipettesByMount, (acc, formPipette: FormPipette, mount): PipetteFieldsData[] => { return formPipette?.pipetteName != null && + formPipette?.pipetteName !== '' && formPipette.tiprackDefURI != null && (mount === 'left' || mount === 'right') ? [ diff --git a/protocol-designer/src/load-file/migration/index.ts b/protocol-designer/src/load-file/migration/index.ts index 120cff0a6ad..531e6fc4dd9 100644 --- a/protocol-designer/src/load-file/migration/index.ts +++ b/protocol-designer/src/load-file/migration/index.ts @@ -27,7 +27,11 @@ export const getMigrationVersionsToRunFromVersion = ( const allSortedVersions = Object.keys(migrationsByVersion).sort( semver.compare ) - return takeRightWhile(allSortedVersions, v => semver.gt(v, version)) + + return takeRightWhile( + allSortedVersions, + v => semver.gt(v, version) && !version.includes(v) + ) } const allMigrationsByVersion: MigrationsByVersion = { diff --git a/protocol-designer/src/step-forms/reducers/index.ts b/protocol-designer/src/step-forms/reducers/index.ts index f180bc5f175..e9b72646071 100644 --- a/protocol-designer/src/step-forms/reducers/index.ts +++ b/protocol-designer/src/step-forms/reducers/index.ts @@ -1355,10 +1355,9 @@ export const additionalEquipmentInvariantProperties = handleActions Date: Thu, 23 May 2024 15:53:58 -0400 Subject: [PATCH 2/3] fix cta in filePage --- protocol-designer/src/components/FilePage.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol-designer/src/components/FilePage.tsx b/protocol-designer/src/components/FilePage.tsx index ac61114364e..7188900cb2f 100644 --- a/protocol-designer/src/components/FilePage.tsx +++ b/protocol-designer/src/components/FilePage.tsx @@ -82,6 +82,7 @@ export const FilePage = (): JSX.Element => { const saveFileMetadata = (nextFormValues: FileMetadataFields): void => { dispatch(actions.saveFileMetadata(nextFormValues)) + setManualDirty(false) } const [isManualDirty, setManualDirty] = React.useState(false) const { @@ -114,7 +115,7 @@ export const FilePage = (): JSX.Element => { 'author', 'description', ]) - + console.log('!isDirty || !isManualDirty', !isDirty || !isManualDirty) return (
@@ -201,7 +202,6 @@ export const FilePage = (): JSX.Element => { type="submit" className={styles.update_button} disabled={!isDirty || !isManualDirty} - onClick={() => setManualDirty(false)} > {isManualDirty ? t('application:update') From df54bb0698713a4d8a41f2e7b707169f75ed7601 Mon Sep 17 00:00:00 2001 From: Jethary Date: Thu, 23 May 2024 15:55:54 -0400 Subject: [PATCH 3/3] remove consol.log --- protocol-designer/src/components/FilePage.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/protocol-designer/src/components/FilePage.tsx b/protocol-designer/src/components/FilePage.tsx index 7188900cb2f..edd055e6917 100644 --- a/protocol-designer/src/components/FilePage.tsx +++ b/protocol-designer/src/components/FilePage.tsx @@ -115,7 +115,6 @@ export const FilePage = (): JSX.Element => { 'author', 'description', ]) - console.log('!isDirty || !isManualDirty', !isDirty || !isManualDirty) return (