Reuse the "Edit Release" form for release creation
What does this MR do?
Updates the component used on the current Edit Release to also support release creation.
This allows the New Release and Edit Release pages to present an (almost) identical user experience.
Edit Release page | New Release page |
---|---|
Differences from the Edit Release page
The only visual differences between the Edit Release page and the New Release page are:
- Different URLs and breadcrumbs
-
Tag name field:
- On the Edit Release page, this field contains the value of the release's associated tag and cannot be edited
- On the New Release page, this field is editable, and an additional Create from field is shown
- Save button text: "Save changes" vs. "Create release"
Technical changes
The bulk of the changes in this MR are in app/assets/javascripts/releases/stores/modules/detail/actions.js
and its corresponding test. These two files have effectively been rewritten.
On a related note, several of the redundant actions in actions.js
have been removed to align with our latest guidelines:
Previously, we were dispatching actions from the
fetchNamespace
action instead of committing mutation, so please don’t be confused if you find a different pattern in the older parts of the codebase. However, we encourage leveraging a new pattern whenever you write new Vuex stores
What doesn't this MR do?
This MR does not implement the ability for a user to create a release based on an existing tag. This ability will be added in a future milestone and is out of scope for this iteration.
Feature flag
This page is hidden behind a new_release_page
feature flag which is disbaled by default. When this feature flag is disabled, the New Release button on the main Releases page redirects to the New Tag page instead of the New Release page.
GIF
Related to #214244 (closed)