-
Notifications
You must be signed in to change notification settings - Fork 180
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
fix(protocol-designer): handle duplicate labware with a full deck #17083
Conversation
If a slot overflow is opened and duplicate labware is clicked, the action will fail silently if no room is left on the robot deck. Here, we use the `getNextAvailableDeckSlot` util to determine whether or not we can dispatch a labware duplication on the deck. If not, we keep the menu open, but render a snackbar letting the user know the reason for the failure. Note that according to new design paradigms, the button remains enabled in every case. Closes AUTH-1146
protocol-designer/src/pages/Designer/DeckSetup/SlotOverflowMenu.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/DeckSetup/SlotOverflowMenu.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/DeckSetup/SlotOverflowMenu.tsx
Outdated
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 lgtm!
protocol-designer/src/pages/Designer/DeckSetup/SlotOverflowMenu.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/DeckSetup/__tests__/SlotOverflowMenu.test.tsx
Outdated
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.
nice! lets make sure to account for all edge cases for if there is a slot available
What do you mean by this? |
@ncdiehl11 oh, its referring to my 1st comment - extending the util to grab the labware definition that is being duplicated |
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.
lgtm
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.
oops forgot to approve 🚀
Overview
If a slot overflow is opened and duplicate labware is clicked, the action will fail silently if no room is left on the robot deck. Here, we use the
getNextAvailableDeckSlot
util to determine whether or not we can dispatch a labware duplication on the deck. If not, we keep the menu open, but render a snackbar letting the user know the reason for the failure. Note that according to new design paradigms, the button remains enabled in every case.Screen.Recording.2024-12-10.at.5.38.09.PM.mov
Closes AUTH-1146
Test Plan and Hands on Testing
Changelog
handleDuplicate
functionReview requests
see test plan
Risk assessment
low-medium. relying on
getNextAvailableDeckSlot
to handle full deck logic