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): error handling in create file wizard #13804

Merged
merged 4 commits into from
Oct 19, 2023

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Oct 17, 2023

closes RAUT-801, RAUT-802, RAUT-786

Overview

This PR adds a few functions to the create file wizard:

  1. wires up error handling for modules/staging area slots/trash bin so things are disabled or go to the correct slot if the default slot is full
  2. changes naming from Staging Areas -> Staging Area Slots
  3. selects the trash bin selection by default for smoother user experience

bonus:
4. fixes a small bug in the deck setup (trash fixture rendering)

Test Plan

Turn on the deck configuration FF in PD and create a flex protocol. Add all 4 staging area slots and try to add all the modules, see that if you add the outer slot modules (H-S, Temp, TC) and the trash bin, that the one you add last is disabled. This goes both ways for trash bin and H-S/Temp/TC. And also notice that the trash bin is selected by default.

NOTE: the disabled state for the module equipment cards is gross and designs should be updated probably, that'll be done later.

When you hit Review file details to create the file, obverse on the deck map that nothing is overlapping and the trash renders in the correct slot.

Changelog

  • rename staging area -> staging area slot in create file wizard and additional items section
  • fix trash fixture rendering in deck setup
  • create utils file in CreateFileWizard folder and create a few new utils for error handling (getTrashSlot and getLastCheckedEquipment)
  • add test coverage
  • wire up trash bin to be selected by default

Review requests

see test plan

Risk assessment

low

@jerader jerader requested a review from a team October 17, 2023 19:37
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #13804 (7390007) into edge (02190d6) will decrease coverage by 0.09%.
Report is 8 commits behind head on edge.
The diff coverage is 64.91%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #13804      +/-   ##
==========================================
- Coverage   71.31%   71.22%   -0.09%     
==========================================
  Files        2418     2422       +4     
  Lines       67988    68081      +93     
  Branches     8162     8190      +28     
==========================================
+ Hits        48483    48489       +6     
- Misses      17556    17642      +86     
- Partials     1949     1950       +1     
Flag Coverage Δ
protocol-designer 45.31% <64.91%> (-0.44%) ⬇️

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

Files Coverage Δ
...r/src/components/modals/CreateFileWizard/index.tsx 76.92% <100.00%> (+2.45%) ⬆️
...ts/modals/CreateFileWizard/ModulesAndOtherTile.tsx 65.51% <66.66%> (-0.62%) ⬇️
...otocol-designer/src/components/DeckSetup/index.tsx 0.00% <0.00%> (-2.92%) ⬇️
...er/src/components/modals/CreateFileWizard/utils.ts 68.88% <68.88%> (ø)

... and 18 files with indirect coverage changes

@koji
Copy link
Contributor

koji commented Oct 18, 2023

Maybe adding padding to the div that wrapping deck map would be good? (especially right-side)

Screenshot 2023-10-18 at 4 21 54 PM

@koji koji self-requested a review October 18, 2023 21:10
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.

Ran through the test plan and it worked as expected.
I think controlling checkbox disable is great but a few cases may confuse users 🤔.

@jerader
Copy link
Collaborator Author

jerader commented Oct 18, 2023

Maybe adding padding to the div that wrapping deck map would be good? (especially right-side)

@koji thanks for the call out! I'll address this when I fix up the deck map, it is still WIP since I am waiting for the v4 deck definition to be migrated into our getDeckDefinition utils.

@jerader jerader merged commit 07af61e into edge Oct 19, 2023
@jerader jerader deleted the pd_staging-area-error-handling branch October 19, 2023 12:25
y3rsh added a commit that referenced this pull request Oct 25, 2023
* edge: (77 commits)
  fix(app): update move gantry text in change pipette flow (#13712)
  fix(app): fix CI after release merge back (#13816)
  chore(hardware): add opentrons hardware package to ot 2 build (#13770)
  feat(protocol-designer): correct step count in create file wizard (#13807)
  feat(protocol-designer): error handling in create file wizard (#13804)
  fix(app): invalidate OT2 calibration queries when calibration flows complete (#13809)
  always jog (#13806)
  chore(app): point updates at dns not s3 (#13798)
  docs(api): updated Flex default flow rates (#13796)
  fix(api): Flag pipette as not ready to aspirate after pushing out air (#13728)
  fix(api, hardware): allow OT3Controller to disable tip motors (#13805)
  more blank trials; longer scale stabilize wait; submerge 2.5mm (#13788)
  fix(app): unload adapters after checking position of labware on adapter on heater shaker module (#13803)
  feat(app): wire up location conflict modal for ODD (#13797)
  feat(app): add Deck configuration page component (#13784)
  fix(robot-server): add default to robot serial (#13802)
  feat(protocol-designer, components): prep work for deck config in PD (#13775)
  feat(app, protocol-designer): plug in waste chute asset (#13800)
  fix(app): do not check mag block in calibration status (#13799)
  feat(protocol-designer): edit additional items staging area support (#13752)
  ...
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