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 theGroup name
field.- This was previous behavior and makes it so a user doesn't unintentionally update the
Group URL
when changing theGroup name
.
- This was previous behavior and makes it so a user doesn't unintentionally update the
- Prevents auto-updating the
Group URL
field when typing in theGroup name
field if theGroup 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 theGroup name
.
- This was previous behavior and makes it so if the user manually sets a
Future MRs
- Implement for
Import group
in app/views/groups/_import_group_from_file_panel.html.haml#L25 - Implement for ee/app/views/registrations/groups/new.html.haml#L23
- 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 flagbin/rails console
Feature.enable(:group_name_path_vue)
- Navigate to
/admin/groups/gitlab-org/edit
- Type in the
Group name
field. TheGroup 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Peter Hegman