Closed ohltyler closed 4 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 21.39%. Comparing base (
83835c2
) to head (439b05f
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
We will we use the backend validation here also in the future when saving?
Also will we have the first save be a create basically then update?
We will we use the backend validation here also in the future when saving?
Definitely, the way I envision it is a 3-layer validation. First is basic form validation (no missing fields), second is flow validation (a DAG), and third would be backend validation. Whether we have it proactive (validation API) or reactive, we can support any way.
Also will we have the first save be a create basically then update?
We will we use the backend validation here also in the future when saving?
Definitely, the way I envision it is a 3-layer validation. First is basic form validation (no missing fields), second is flow validation (a DAG), and third would be backend validation. Whether we have it proactive (validation API) or reactive, we can support any way.
Also will we have the first save be a create basically then update?
looks good to me, might want to revisit when we have those integrated how the save functionality will look like with the different validation, since as you commented save = create or update and launch is provision I assume. wonder if we should have differentiation for just quick create and launch too, or like we force to save and then launch, and obvious that the first save is equal to create
We will we use the backend validation here also in the future when saving?
Definitely, the way I envision it is a 3-layer validation. First is basic form validation (no missing fields), second is flow validation (a DAG), and third would be backend validation. Whether we have it proactive (validation API) or reactive, we can support any way.
Also will we have the first save be a create basically then update?
looks good to me, might want to revisit when we have those integrated how the save functionality will look like with the different validation, since as you commented save = create or update and launch is provision I assume. wonder if we should have differentiation for just quick create and launch too, or like we force to save and then launch, and obvious that the first save is equal to create
Right this will all need to be revisited when things are more finalized, for now we have placeholders and TODOs in code. This is just incremental.
Description
This PR improves the overall validation logic on the workflow editor:
Save
button. This is done by propagating callback fnonFormChange
to the low-level form components, and performing form validation and submission when clickingSave
buttonworkspaceFlowState
fromworkspace
to parent componentresizableWorkspace
. This allows us to perform validation in a consistent way, and pass the same, updated workflow to all downstream components.saveWorkflow
to perform only save/updateAdditional changes:
Submit
button since we have the logic available in theSave
button nowNote that the form validation logic is complete - however, the flow validation logic is still in TODO state; for now, it always succeeds / is valid.
Screenshots:
Form validation:
Flow validation:
Demo videos:
Form validation integrated with
Save
button being disabled/enabled depending on unsaved changes. Note that on submitting / clickingSave
, all invalid fields are highlighted appropriately, across all components. And, once everything is valid, the callout does not appear when saving.screen-capture (18).webm
Flow validation integrated with
Save
button being disabled/enabled depending on unsaved changes. Ignore the callout as that logic is still a placeholder.screen-capture (19).webm
Issues Resolved
Resolves #5
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.