fix: allow editing of build containerfile #4471
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.
What does this PR do?
Changes the build image form from a readonly text field that you click on to browser, to a more common editable text field with a Browse button. Likewise the build directory was hidden until you entered a containerfile before, now it is always visible and uses the same text field + browse button.
This change makes the form use a more common pattern, and allows e2e tests to more easily enter text in either field.
The drawback to this approach is that there is no more validation than before - the build button enables whenever there is text in both fields. This happens automatically when you use the Browse button like before, but if you edit or copy/paste and have a typo you won't find out until you click Build. We could add more validation in the future, but IMHO the better usability/form layout is enough of a benefit to make this change in the meantime.
Screenshot/screencast of this PR
What issues does this PR fix or reference?
Fixes #3824.
How to test this PR?
Just go to Images > Build Image.