-
Notifications
You must be signed in to change notification settings - Fork 175
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): edit multiple modules modal + row #14933
Conversation
const { control, handleSubmit } = useForm<EditMultipleModulesModalValues>() | ||
const moduleLocations = Object.values(allModulesOnDeck) | ||
.filter(module => module.type === moduleType) | ||
.map(temp => `cutout${temp.slot}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the DeckConfigurator
uses cutoutId
s so i had to do a bunch of converting between cutoutId and slot 🤔. i guess i could make a map to easily map between slot and cutoutId so i don't have to do this. idk i think it is okay as is but could definitely be cleaner 😅
protocol-designer/src/components/modals/EditModulesModal/EditMultipleModulesModal.tsx
Show resolved
Hide resolved
protocol-designer/src/components/modals/EditModulesModal/EditMultipleModulesModal.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/components/modals/EditModulesModal/EditMultipleModulesModal.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/components/modules/__tests__/MultipleModuleRow.test.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/components/modals/EditModulesModal/EditMultipleModulesModal.tsx
Outdated
Show resolved
Hide resolved
cleanup() | ||
}) | ||
it('renders modal and buttons with no error', () => { | ||
vi.mocked(getLabwareIsCompatible).mockReturnValue(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit
using vitest-when would be better.
maybe leaving ToDo
is good for the future.
...-designer/src/components/modals/EditModulesModal/__tests__/EditMultipleModulesModal.test.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few comments but the changes look good to me.
the sandbox worked as expected.
closes AUTH-16
Overview
the edit modules modal for MoaM now works for multiples, and the module row now has knowledge of all of the occupied slots
Test Plan
Make sure the MoaM ff is turned on and create a flex protocol. Add 1 temperature module in the create file wizard. Then edit the temperature modules and make sure it works as expected.
Changelog
EditModules
andEditModulesCard
to accommodate the changegetModulesForEditModulesCard
selector to accommodate moamReview requests
see test plan
Risk assessment
low