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

fix(protocol-designer): handle duplicate labware with a full deck #17083

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented Dec 11, 2024

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

  • fill a robot deck with any combination of modules, adapters, and labware
  • select any labware and click "Duplicate labware"
  • verify taht menu remains open, no labware addition is dispatched, and snackbar renders stating that the deck is full

Changelog

  • get whether deck is full in SlotOverflowMenu and handle logic in handleDuplicate function
  • add test and translation

Review requests

see test plan

Risk assessment

low-medium. relying on getNextAvailableDeckSlot to handle full deck logic

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
@ncdiehl11 ncdiehl11 self-assigned this Dec 11, 2024
@ncdiehl11 ncdiehl11 requested review from koji and jerader December 11, 2024 01:39
@ncdiehl11 ncdiehl11 marked this pull request as ready for review December 11, 2024 01:39
@ncdiehl11 ncdiehl11 requested a review from a team as a code owner December 11, 2024 01:39
@ncdiehl11 ncdiehl11 removed the request for review from a team December 11, 2024 01:39
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 lgtm!

Copy link
Collaborator

@jerader jerader left a 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

@ncdiehl11
Copy link
Collaborator Author

nice! lets make sure to account for all edge cases for if there is a slot available

What do you mean by this?

@jerader
Copy link
Collaborator

jerader commented Dec 11, 2024

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

Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Collaborator

@jerader jerader left a 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 🚀

@ncdiehl11 ncdiehl11 merged commit 62a6ff3 into edge Dec 11, 2024
14 checks passed
@ncdiehl11 ncdiehl11 deleted the pd_fix-duplicate-logic branch December 11, 2024 22:16
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.

3 participants