Simplify export flow; improve form state #284
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR accomplishes 2 things:
1/ moves the export flow to a static button at the top instead of a standalone step in the form flow. This lets users generate the current template at any point
2/ improves the form button state. Now, buttons are enabled/disabled based on if the current form would produce a different final template or not (for both ingest and search). Before, it was just based on form values being changed or not. The issue was that after reverting the form to original values from the last template update, it would still show as outdated. (example: provision a workflow with index name "abc", provision button is disabled. After changing to "abcd", button is enabled to update. But, if changing back to "abc", button is still enabled to update, even though the underlying template would not actually be changed). Note we can't use comparison to the form's initial values, since we have autosave that is already updating that behind the scenes.
Other details:
KnnIndexer
to justIndexer
. May have more detailed defaults later onExportOptions
to have some helper text at the top. May be tuned later on.Demo video, showing:
screen-capture.23.webm
Note: due to the multiple layers of form validation, I've created a tracking issue to audit everything at a later time: #286
Issues Resolved
Makes progress on #23
Resolves #272
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.