-
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
feat(protocol-designer): bring back deck setup drag & drop #17477
base: chore_release-pd-8.4.1
Are you sure you want to change the base?
Conversation
@alexjoel42 & @y3rsh - i had to update how we are selecting slots in cypress because this PR adds a lot more complexity to it (basically, hovering of a slot, adapter, and labware each have their own hover component now instead of sharing one). instead of our previous logic that had the slot's exact foreign object x,y location, I added a please take a look at my cypress changes when you have time! |
@@ -126,6 +126,10 @@ export enum SetupContent { | |||
Save = 'Save', | |||
} | |||
|
|||
export const RegexSetupContent = { | |||
slotText: /Edit (slot|labware)/i, |
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.
depending on if the hover is on a slot/module or labware/adapter, the copy is different. this was actually always the case so not sure why cypress is mad at it now. Figured a regex to fluctuate between both options was the easiest @alexjoel42 @y3rsh
closes AUTH-1276
Overview
This PR brings back drag/drop to deck setup with the same functionality as it had in the pre-redesign. You can only drag top-level labware and can not drag: modules or adapters. When we add stacking capabilities, we will need to refactor it to account for that level of stacking.
Test Plan and Hands on Testing
Test that you can drag and drop any labware to any slot on the deck (minus trash bins/waste chutes). If the labware is not allowed to that slot, you should see the warning
blockedSlot
label indicating that you can't drop it there.Changelog
LabwareControls
,AdapterControls
, andSlotControls
for the deck map andDeckItemHover
is now refactored intoOffDeckControls
since its used only for off deck. The reason why they needed to each have their own is because the react dnd considerations are different for eachDragPreview
which is responsible for the lighter container when you are actively dragging something aroundRobotCoordinateSpaceWithRef
to returngetRobotCoordsFromDOMCoords
which is used inDragPreview
to determine the DOM coordinatesDeckSetupDetails
to accommodate those new controlsgetSwapBlocked
to be used for labware<>module compatibilitymoveLabwareFormErrors
to also use the new labware<>adapter compatibility methodRisk assessment
mid- affected deck setup and is the bulk of the 8.4.1 release