Skip to content

Add support for editing a group in the admin area

What does this MR do and why?

Related to #361816 (closed)

In !88085 (merged) we introduced a feature flag group_name_path_vue to help convert the HAML and Vanilla JS responsible for the Group name and Group URL fields shown when creating or editing a group. !88085 (merged) added most of the required functionality but left out some of the editing functionality to keep the MR size reasonable. This MR implements the following functionality:

  • Adds a warning message when editing a group in the admin area.
  • Adds a Group ID field when editing a group in the admin area.
  • When editing a group in the admin area, prevents auto-updating the Group URL field when typing in the Group name field.
    • This was previous behavior and makes it so a user doesn't unintentionally update the Group URL when changing the Group name.
  • Prevents auto-updating the Group URL field when typing in the Group name field if the Group URL field was manually updated. This applies to creating and editing groups.
    • This was previous behavior and makes it so if the user manually sets a Group URL then it isn't unintentionally updated when changing the Group name.

Future MRs

  1. Implement for Import group in app/views/groups/_import_group_from_file_panel.html.haml#L25
  2. Implement for ee/app/views/registrations/groups/new.html.haml#L23
  3. Remove legacy jQuery and HAML

Screenshots or screen recordings

Before After
Screen_Recording_2022-06-09_at_1.09.24_PM Screen_Recording_2022-06-09_at_1.07.48_PM

How to set up and validate locally

  • Enable the group_name_path_vue feature flag
    • bin/rails console
    • Feature.enable(:group_name_path_vue)
  • Navigate to /admin/groups/gitlab-org/edit
  • Type in the Group name field. The Group URL field should not update.
  • Type in the Group URL field, it should call the API to see if the URL is available.
  • Change the Group URL back to the original URL, it should not call the API.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Peter Hegman

Merge request reports

Loading