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(components, protocol-designer, step-generation): full absorbance reader step form UI #17306

Merged
merged 4 commits into from
Jan 21, 2025

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented Jan 17, 2025

Overview

This PR completes the UI for absorbance reader step form, specifically creating the initialization editor component. It also adds form errors for all implicated fields throughout the form.

Note that because all wavelengths are actually produced by the same form field, logic for handling each individual wavelength error is handled within the component rather than our existing infrastructure for form/fieldLevel errors.

Closes AUTH-1267, Closes AUTH-1315

Test Plan and Hands on Testing

  • walk through creating absorbance plate reader steps (initialize single/multi, open lid, move labware, read), and verify that error handling and UI functionality works as expected
  • export and inspect commands and verify that commands and params are correct

Changelog

  • add component for handling initialization editing
  • add all translations for step form
  • fix defaults and form types

Review requests

see test plan

Risk assessment

low. should not implicate any other parts of PD not related to the absorbance reader step form

… reader step form UI

This PR completes the UI for absorbance reader step form, specifically creating the initialization editor component. It also adds form errors for all implicated fields throughout the form.

Closes AUTH-1267, Closes AUTH-1315
@ncdiehl11 ncdiehl11 self-assigned this Jan 17, 2025
@ncdiehl11 ncdiehl11 requested review from koji and jerader January 17, 2025 22:07
@ncdiehl11 ncdiehl11 marked this pull request as ready for review January 17, 2025 22:08
@ncdiehl11 ncdiehl11 requested review from a team as code owners January 17, 2025 22:08
@ncdiehl11 ncdiehl11 removed request for a team January 17, 2025 22:08
@ncdiehl11 ncdiehl11 changed the title feat(components,-protocol-designer,-step-generation): full absorbance reader step form UI feat(components, protocol-designer, step-generation): full absorbance reader step form UI Jan 20, 2025
moduleId: null,
referenceWavelength: null,
wavelengths: null,
referenceWavelengthActive: false,
wavelengths: [''],
Copy link
Collaborator

Choose a reason for hiding this comment

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

how come wavelengths can be defaulted to an empty array []?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The reason here is because we always want to show at least one wavelength option. If we don't do this, we need to add a useEffect and some other ugliness upon mounting. I think this is the cleanest solution, as this property is ignored unless the form type is initialize

Copy link
Collaborator

Choose a reason for hiding this comment

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

i see, i guess this doesn't actually affect anything to have it an empty string here.

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 good! left some comments.

Noticed that i18n isn't working here when smoke testing
Screenshot 2025-01-21 at 09 03 36

Additionally, this may or may not be a bug but the error doesn't erase when you show a new wavelength:

Screen.Recording.2025-01-21.at.09.05.03.mov

@ncdiehl11
Copy link
Collaborator Author

looks good! left some comments.

Noticed that i18n isn't working here when smoke testing Screenshot 2025-01-21 at 09 03 36

Additionally, this may or may not be a bug but the error doesn't erase when you show a new wavelength:

Screen.Recording.2025-01-21.at.09.05.03.mov

Probably because I forgot to add translations to this component 😆
Regarding the error persisting, I think this is intended behavior, but I will check with Mel.

@ncdiehl11 ncdiehl11 requested a review from jerader January 21, 2025 15:51
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.

woohoo! this is exciting progress, great to see this progress with the form!

@ncdiehl11 ncdiehl11 merged commit e837257 into edge Jan 21, 2025
37 checks passed
@ncdiehl11 ncdiehl11 deleted the feat_pd-abs-reader-ui-pt2 branch January 21, 2025 17:11
caila-marashaj pushed a commit that referenced this pull request Feb 11, 2025
… reader step form UI (#17306)

This PR completes the UI for absorbance reader step form, specifically
creating the initialization editor component. It also adds form errors
for all implicated fields throughout the form.

Note that because all wavelengths are actually produced by the same form
field, logic for handling each individual wavelength error is handled
within the component rather than our existing infrastructure for
form/fieldLevel errors.

Closes AUTH-1267, Closes AUTH-1315
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.

2 participants