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): edit multiple modules modal + row #14933

Merged
merged 6 commits into from
Apr 18, 2024

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Apr 17, 2024

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.

Screenshot 2024-04-17 at 12 24 14 Screenshot 2024-04-17 at 12 24 25

Changelog

  • create a new multiple modules component for row and editing
  • add test coverage to those new components
  • modify EditModules and EditModulesCard to accommodate the change
  • edit the getModulesForEditModulesCard selector to accommodate moam

Review requests

see test plan

Risk assessment

low

@jerader jerader requested a review from a team as a code owner April 17, 2024 16:26
@jerader jerader requested review from koji and ncdiehl11 and removed request for a team April 17, 2024 16:26
const { control, handleSubmit } = useForm<EditMultipleModulesModalValues>()
const moduleLocations = Object.values(allModulesOnDeck)
.filter(module => module.type === moduleType)
.map(temp => `cutout${temp.slot}`)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the DeckConfigurator uses cutoutIds 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 😅

@jerader jerader requested a review from koji April 18, 2024 12:47
cleanup()
})
it('renders modal and buttons with no error', () => {
vi.mocked(getLabwareIsCompatible).mockReturnValue(true)
Copy link
Contributor

@koji koji Apr 18, 2024

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.

Copy link
Contributor

@koji koji left a 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.

@jerader jerader merged commit 585f69e into edge Apr 18, 2024
14 checks passed
@jerader jerader deleted the pd_moam-edit-modal branch April 18, 2024 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants