Skip to content

refactor(protocol-designer): allow for multiple lid selection #18739

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

Merged
merged 7 commits into from
Jul 3, 2025

Conversation

jerader
Copy link
Collaborator

@jerader jerader commented Jun 25, 2025

partially addresses AUTH-1945

Overview

NOTE: there is a bug right now where if you click a checkbox and un click it, it scrolls down to a bunch of white space at the bottom of the modal. that is a bug that will be addressed separately

This PR fixes the designs to allow for multiple lids to be selected. It switches between a checkbox vs 2 options to select.

With 1 lid option:
Screenshot 2025-06-25 at 15 57 59

With 2 lid options:
Screenshot 2025-06-25 at 15 58 18

Test Plan and Hands on Testing

Turn on the stacking ff
click to add the Tough 96 well plate and see that there are 2 lid options. select one and add. should be the plate + lid added to the deck. The clear button in the toolbox should delete both

Changelog

  • refactor SelectLabwareModal to multiple components to allow for easier readability
  • extend the logic to account for a list of lids and selecting them
  • fix bug where you couldn't delete a lid + labware at the same time

Risk assessment

low

@jerader jerader requested review from a team as code owners June 25, 2025 19:57
@jerader jerader requested review from mjhuff, koji, ncdiehl11 and smb2268 and removed request for a team and mjhuff June 25, 2025 19:57
@@ -135,6 +141,10 @@ export function CustomizeExpandButton(
)
}

export const CustomizeExpandButton: MemoExoticComponent<
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i guess i'm not sure if this is needed. thought it helped with this bug https://opentrons.atlassian.net/browse/AUTH-1916 but it did not

Copy link

codecov bot commented Jun 25, 2025

Codecov Report

Attention: Patch coverage is 62.32143% with 211 lines in your changes missing coverage. Please review.

Project coverage is 24.81%. Comparing base (4d1c163) to head (16e31a3).
Report is 2 commits behind head on edge.

Files with missing lines Patch % Lines
...ganisms/SelectLabwareModal/SelectCustomLabware.tsx 26.50% 61 Missing ⚠️
...isms/SelectLabwareModal/SelectLabwareOnAdapter.tsx 67.66% 54 Missing ⚠️
...nts/organisms/SelectLabwareModal/SelectLabware.tsx 70.28% 52 Missing ⚠️
...rganisms/SelectLabwareModal/SelectLidOnLabware.tsx 40.67% 35 Missing ⚠️
.../src/pages/Designer/DeckSetup/DeckSetupToolbox.tsx 50.00% 5 Missing ⚠️
...onents/organisms/LabwareCardOverflowMenu/index.tsx 50.00% 2 Missing ⚠️
...col-designer/src/pages/Designer/DeckSetup/utils.ts 93.33% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #18739      +/-   ##
==========================================
- Coverage   27.07%   24.81%   -2.27%     
==========================================
  Files        3246     3305      +59     
  Lines      257281   287032   +29751     
  Branches    26866    35287    +8421     
==========================================
+ Hits        69671    71234    +1563     
- Misses     187588   215777   +28189     
+ Partials       22       21       -1     
Flag Coverage Δ
app 2.07% <0.00%> (+0.83%) ⬆️
protocol-designer 19.15% <62.32%> (+0.05%) ⬆️

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

Files with missing lines Coverage Δ
...ents/src/molecules/CustomizeExpandButton/index.tsx 65.45% <100.00%> (-30.88%) ⬇️
...ner/src/components/organisms/LabwareCard/index.tsx 93.37% <100.00%> (+0.13%) ⬆️
.../components/organisms/SelectLabwareModal/index.tsx 86.62% <100.00%> (+27.52%) ⬆️
...onents/organisms/LabwareCardOverflowMenu/index.tsx 73.22% <50.00%> (-0.67%) ⬇️
...col-designer/src/pages/Designer/DeckSetup/utils.ts 41.66% <93.33%> (-8.03%) ⬇️
.../src/pages/Designer/DeckSetup/DeckSetupToolbox.tsx 67.83% <50.00%> (-7.17%) ⬇️
...rganisms/SelectLabwareModal/SelectLidOnLabware.tsx 40.67% <40.67%> (ø)
...nts/organisms/SelectLabwareModal/SelectLabware.tsx 70.28% <70.28%> (ø)
...isms/SelectLabwareModal/SelectLabwareOnAdapter.tsx 67.66% <67.66%> (ø)
...ganisms/SelectLabwareModal/SelectCustomLabware.tsx 26.50% <26.50%> (ø)

... and 1658 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jerader jerader requested a review from koji June 27, 2025 20:16
@ncdiehl11
Copy link
Collaborator

Couple initial notes:

Looks like the plate itself is listed as a compatible lid?

Screenshot 2025-07-03 at 12 17 25 PM

Also, not sure if the copy "Lid compatible labware" is the clearest. Shouldn't it be "Labware-compatible lids" heading the list of compatible lids?

What is the intended behavior when selecting "Edit liquids and quantity" ? Looks like we're brought to the add liquids page

Screenshot 2025-07-03 at 12 20 18 PM

@jerader
Copy link
Collaborator Author

jerader commented Jul 3, 2025

Couple initial notes:

Looks like the plate itself is listed as a compatible lid?

@ncdiehl11 - oh, dang, its because you can stack that labware. i think this is the only labware with this issue. i'll add a ticket to address it in a follow up since its a special-case. Good catch!

Also, not sure if the copy "Lid compatible labware" is the clearest. Shouldn't it be "Labware-compatible lids" heading the list of compatible lids?

Hehe that copy wasn't in the designs so i will update it to you suggestion and have Design call it out later for DQA

What is the intended behavior when selecting "Edit liquids and quantity" ? Looks like we're brought to the add liquids page

Yes, its not fully wired up yet. EXEC will wire it up for flex stacker work!

@jerader
Copy link
Collaborator Author

jerader commented Jul 3, 2025

I made a ticket to address item 1: https://opentrons.atlassian.net/browse/AUTH-2033

Copy link
Collaborator

@ncdiehl11 ncdiehl11 left a comment

Choose a reason for hiding this comment

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

couple of small comments for efficiency but works well given the followups!

Copy link
Collaborator

Choose a reason for hiding this comment

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

😮

@jerader jerader merged commit ed6dd8c into edge Jul 3, 2025
38 checks passed
@jerader jerader deleted the pd_select-labware-refactor branch July 3, 2025 19:17
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