Skip to content

Delete Releases in UI of "Edit Release" page

Problem to solve

Today, users are able to delete a release via the Release API. In order to support all the capabilities in the UI, we need to enable users to delete the Release.

User story

As a user, I want to be able to delete a release using the UI, so that I can easily manage my release entries without having to switch context between UI and API.

Intended users

Further details

Use cases

  • A user adds release notes to a tag, but realizes this is not the right tag and wants to easily remove the release
  • A user wants to delete a historical release on the release page for hygiene, but still wants to be able to pull historical releases via API.

Proposal

🌈 SEE PROTOTYPES IN THE DESIGN TAB

Acceptance criteria

  • Users should be able to delete a release through the UI.
  • In the edit view of a release entry, a button to delete the release should be added to the bottom of the page.
    • Permission: Only Mantainers should see the button. For all other roles, it should not be rendered in the UI.
    • frontend: Use gitlab-ui button, type danger
    • Button label should read: Delete release
  • Clicking the Delete release button in the edit release form should trigger confirmation a modal. The copy should read:
    • frontend: Use gitlab-ui modal component.
      • Modal title: Delete release
      • Modal body: You are about to delete <release_name>. The related Git tag remains, and the assets from this release can still be found in the <tag_page>. Read more about <deleting a release>. Are you sure you want to continue?
        • the <tag_page> should link to the detail view of the tag associated to the release. <deleting a release> should link to the documentation anchor for release deletion.
      • Buttons: Cancel and Delete
    • Clicking Cancel closes the modal. No action is performed.
    • Clicking Delete release closes the modal and triggers an action to delete the release entry.
  • If the user confirms the deletion of a release in the modal, the browser should redirect the user to the Releases overview page.
  • Deleting a release should NOT delete the Git tag and evidence collection.
  • In the Releases overview page, the deleted release entry should be removed from the UI.
  • A toast component should be displayed in the UI, with a confirmation message.
    • frontend: Use gitlab-ui toast component.
    • Please note: the prototype displays an alert, but the implementation should use a Toast component.
    • The toast should be dismissible (display the close button).

Permissions and Security

  • Only Developers and above should be able to delete Releases.
  • If a user does not have access to delete a Release, they should not see the delete button in the UI.

Out of scope

  • We can also consider in a future iteration restoration of deleted Releases.
  • For this iteration, we won't consider going through an approval process for deleting a Release. Later on, deleting a release would kick off a merge request for the Project Owner/Maintainer to Approve prior to approval

Documentation

Yes, this feature requires a new documentation on the Releases Docs Page. Technical Writing

Availability & Testing

  • When a release is deleted a tag should not be deleted
  • The Release and Release View Page should be removed when someone deletes the release from the UI (and API for that matter)

What does success look like, and how can we measure that?

Users will be able to delete releases through the UI.

What is the type of buyer?

  • Core/Community

Links / references

Edited by Rayana Verissimo