Skip to content

Do not display Update app button when saving Knative domain name

Enrique Alcántara requested to merge 58269-separate-update-patch into master

What does this MR do?

The problem

This MR addresses UX issues described in #58269 (closed) regarding editing Knative domain name.

TL;DR; When Knative new domain name is saved, the app behaves like it is being Updated and displays the "Updating button". After the new domain is saved, the app also displays success or error messages that correspond to a different operation.

The solution

When saving a different knative domain name, the "Save changes" button indicates an ongoing operation and the Update button does not appear anymore:

clicking_save

A custom success message that indicates the new domain name was saved:

knative_toast

A custom error message that indicates an error saving the new domain:

custom_error_message

Implementation observations

Knative is not updateable

As explained in https://gitlab.com/gitlab-org/gitlab-ce/issues/58269#note_156868251, the API indicates that Knative is updating even when the requested operation is just changing the domain name. This represents a limitation in the front-end because it is not possible to distinguish between updating Knative to a new version and just changing its domain.

This issue is circumvented in this MR by assuming Knative is not updateable using GitLab Managed Apps. Only GitLab runner can be updated to a newer version. Marking Knative as not updateable, allow us to hide the Update app UI in this context.

Encapsulate Knative domain editor into its own component

Changing Knative is a different operation, and as demonstrated in the solution section, it has its own feedback notifications. That, in turn, increases the complexity the applications.vue component hence this MR extracts that logic into its own component. That decision will be useful in the future too because, at some point, we’ll have to address the distinction between updating KNative and just changing its domain name and doing it in a separate component is easier.

Does this MR meet the acceptance criteria?

Conformity

Closes #58269 (closed)

Edited by Enrique Alcántara

Merge request reports