Skip to content

Fix cancel button redirect behavior when editing a virtual registry

Problem

Currently, when editing a virtual registry, the cancel button redirect behavior is inconsistent:

  • When editing from the registry detail page → cancel redirects back to the registry detail page
  • When editing from the registries list view → cancel redirects back to the registries list view instead of the registry detail page

This inconsistency creates a confusing user experience.

Additionally, the "Create registry" button should be hidden when the limit of Maven virtual registries is reached.

Expected Behavior

  1. The cancel button should always redirect back to the registry detail page, regardless of where the edit action was initiated from. This provides a consistent and logical navigation flow.

  2. The "Create registry" button should be hidden when a top-level group has reached the limit of 20 Maven virtual registries, as per the prerequisites documentation.

Current Behavior

As reported in &15090 (comment 2728635655):

Minor UX question: When I'm on a specific registry page, if I try to add an upstream (link or new) and hit cancel, it brings me back to the virtual registry page I was already on. If I try to edit the registry and save it does the same. But, when I hit cancel from the edit screen, it brings me back to the view of all registries.

Currently, the "Create registry" button is always visible regardless of how many Maven virtual registries exist in the top-level group.

Solution

  1. Update the cancel button logic in the edit registry form to consistently redirect to the registry detail page instead of the previous page.

  2. Implement logic to hide the "Create registry" button when a top-level group has 20 or more Maven virtual registries.

Related

Edited by Rahul Chanila