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

refactor(protocol-designer, step-generation): allow aluminum blocks t… #14174

Merged
merged 2 commits into from
Dec 12, 2023

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Dec 12, 2023

…o be moved, disallow adapters

closes RQA-2060

Overview

The off-deck slideout now filters out adapters but keeps aluminum blocks. And aluminum blocks can not be moved only manually.

Test Plan

Create either a Flex or Ot-2 protocol. Add a gripper. On the design tab, click on the edit off-deck button and in the labware selection, the adapters should NOT be available. The aluminum blocks SHOULD be available. Click to add an aluminum block off-deck.

Create a move labware step and move the aluminum block off-deck and onto a slot. The step should be created correctly.

Create a new move labware step and move the aluminum block to a new slot (not off-deck) and make sure the use gripper checkbox is selected. This step should error and show a timeline error saying that the gripper cannot move aluminum blocks. If you edit the step and uncheck the the box, the step should work as expected.

Changelog

  • clean up LabwareSelectionModal's util logic and filter out adapters if the slot is off-deck
  • clean up logic in the selector, allow aluminum blocks to be selectable in the dropdown menu
  • create a new error creator CANNOT_MOVE_WITH_GRIPPER and add to i18n
  • plug the error creator into moveLabware atomic command
  • add test coverage for the error creator

Review requests

see test plan

Risk assessment

low

@jerader jerader requested a review from a team December 12, 2023 16:29
@jerader jerader requested a review from a team as a code owner December 12, 2023 16:29
@jerader jerader requested review from koji and mjhuff and removed request for a team December 12, 2023 16:29
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Merging #14174 (9bd9081) into edge (a32571e) will increase coverage by 0.00%.
Report is 1 commits behind head on edge.
The diff coverage is 75.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             edge   #14174   +/-   ##
=======================================
  Coverage   70.40%   70.40%           
=======================================
  Files        2510     2510           
  Lines       71201    71202    +1     
  Branches     8971     8970    -1     
=======================================
+ Hits        50127    50128    +1     
  Misses      18880    18880           
  Partials     2194     2194           
Flag Coverage Δ
protocol-designer 44.55% <75.00%> (+<0.01%) ⬆️
step-generation 86.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...neration/src/commandCreators/atomic/moveLabware.ts 76.74% <ø> (ø)
step-generation/src/errorCreators.ts 92.30% <ø> (ø)
step-generation/src/types.ts 100.00% <ø> (ø)
...ts/LabwareSelectionModal/LabwareSelectionModal.tsx 48.36% <85.71%> (+0.86%) ⬆️
protocol-designer/src/ui/labware/selectors.ts 62.22% <0.00%> (-0.83%) ⬇️

const { dimensions, parameters } = labwareDef
const { xDimension, yDimension } = dimensions

const smallXDimension = xDimension < 127.75
Copy link
Contributor

@koji koji Dec 12, 2023

Choose a reason for hiding this comment

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

nit
maybe isSmallerXDimension since it would be easy to understand that the const is boolean.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh ya good call! thanks!

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.

Followed the test plan and the sandbox worked as expected.
The changes look good to me.

@jerader jerader merged commit cf8876f into edge Dec 12, 2023
17 checks passed
@jerader jerader deleted the pd_aluminum-block-adapters-off-deck branch December 12, 2023 20:06
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.

2 participants