-
Notifications
You must be signed in to change notification settings - Fork 178
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, components): wire up pause form in PD redesign #16328
Conversation
This PR adds form functionality and UI for pause step in PD redesign. I consolidate pause hours, minutes, and seconds into a single colon-delimited time field, add errors and masking, and parse the time string when creating command arguments. I also touch several components that require styling refactors, including `Toolbox`, `DropdownMenu`, and `RadioButton`. Note that migrating separate pause time fields to a single field will be addressed in a future PR. Closes AUTH-809
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx
Outdated
Show resolved
Hide resolved
protocol-designer/src/steplist/formLevel/stepFormToArgs/pauseFormToArgs.ts
Show resolved
Hide resolved
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.
left a handful of cleanup comments but this is looking really good! nice work!
i also left some comments about the errorsToShow stuff. The bug is specifically with makeSingleEditFieldProps
in protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/utils.ts
. on line 259, the logic is wrong and should say const errorToShow = showErrors && errors.length > 0 ? errors.join(', ') : null
. I think that will prevent errorsToShow
from populating unless the field has been dirtied/selected.
protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/StepTools/PauseTools/index.tsx
Show resolved
Hide resolved
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.
left a small clean up comment but after that is addressed, this LGTM! nice work with adding the new field! excited to see the pause step form come to life. Don't forget to add a ticket in the migration epic if you haven't already to remind us to migrate the old fields over.
ignoring brittle Cyprus test |
Overview
This PR adds form functionality and UI for pause step in PD redesign. I consolidate pause hours, minutes, and seconds into a single colon-delimited time field, add errors and masking, and parse the time string when creating command arguments. I also touch several components that require styling refactors, including
Toolbox
,DropdownMenu
, andRadioButton
. Note that migrating separate pause time fields to a single field will be addressed in a future PR.Closes AUTH-809
Test Plan and Hands on Testing
hh:mm:ss
Changelog
PauseTools
componentpauseTime
field to pause form data (will replace pauseHours, minutes, and seconds once redesign FF is removed)pauseTime
textReview requests
Risk assessment