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): initial absorbance reader stepform UI #17280

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented Jan 15, 2025

Overview

This PR adds the initial UI for absorbance reader steps. It creates the new AbsorbanceReaderTools component in line with our other step form toolbox components, and modularizes its children components for cleanliness. The content of both pages 1 and 2 of the form are determined by:

  1. module initialization state, and
  2. labware presence or lack thereof.

According to designs, the UI will funnel the user into the correct step form type (lid, initializaton, or reading) based on those 2 inputs. Also implicated here are creation and wiring up of the following methods:

  • patch to pre-select an absorbance reader module if only one is available
  • form change handlers for absorbance reader dependent fields
  • absorbance reader module option getter

Closes AUTH-1264

Test Plan and Hands on Testing

  • create or open a protocol on this branch
  • on starting deck, add an absorbance reader to any of right column of slots; also ensure a gripper is added
  • navigate to timeline and add an absorbance reader step
  • navigate through form and ensure UI looks correct (translations pending)
  • changing the module ID or form type (lid, read, initialize) should reset other field values to default

Because of the conditional nature of this step form content, it is slightly difficult to test the UI thoroughly at present. Functionality will be able to be thoroughly tested in a fast-follow PR that wires up step generation and allows for module controls to be manipulated.

Changelog

  • add UI components for absorbance reader tools
  • implement in StepFormToolbox
  • add utilities for form handling

Review requests

  • see test plan

Risk assessment

low

This PR adds the initial UI for absorbance reader steps. It creates the new AbsorbanceReaderTools component in line with our other step form toolbox components, and modularizes its children components for cleanliness. The content of both pages 1 and 2 of the form are determined by 1) module initialization state, and 2) labware presence or lack thereof. According to designs, the UI will funnel the user into the correct step form type (lid, initializaton, or reading) based on those 2 inputs. Also implicated here are creation and wiring up of the following methods: patch to pre-select an absorbance reader module if only one is available, form change handlers for absorbance reader dependent fields, absorbance reader module option getter.

Closes AUTH-1264
@ncdiehl11 ncdiehl11 self-assigned this Jan 15, 2025
@ncdiehl11 ncdiehl11 requested review from koji and jerader January 15, 2025 19:43
@ncdiehl11 ncdiehl11 marked this pull request as ready for review January 15, 2025 19:43
@ncdiehl11 ncdiehl11 requested a review from a team as a code owner January 15, 2025 19:43
@ncdiehl11 ncdiehl11 removed the request for review from a team January 15, 2025 19:43
@jerader
Copy link
Collaborator

jerader commented Jan 15, 2025

fyi, this is not related but noticed that MoaM placement isn't correct when adding multiple from the onboarding flow

Screenshot 2025-01-15 at 14 57 39

@ncdiehl11
Copy link
Collaborator Author

fyi, this is not related but noticed that MoaM placement isn't correct when adding multiple from the onboarding flow

Screenshot 2025-01-15 at 14 57 39

thanks, just ticketed

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.

looks great, nice work! just left the comment about the useEffect. You should be able to get access to the latest robot state in the patch to get the initialization info and labware info, similarly to what we do for _patchThermocyclerFields accessing latest robot state

const { formData, propsForFields, toolboxStep } = props
const { moduleId } = formData
const dispatch = useDispatch()
const { t } = useTranslation()
Copy link
Contributor

Choose a reason for hiding this comment

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

same

@ncdiehl11 ncdiehl11 merged commit 88408a2 into edge Jan 15, 2025
14 checks passed
@ncdiehl11 ncdiehl11 deleted the feat_pd-absorbance-reader-ui branch January 15, 2025 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants