Organizations - Delete groups from list
What does this MR do and why?
Closes #421473 (closed)
This change was heavily inspired by !144095 (merged)
Important: This change is behind a feature flag :ui_for_organizations
This change adds logic to allow a user to delete a Group from an Organization list view.
Important UX Note
Currently the list view does not represent when a group is pending deletion. So once you click delete it may appear as nothing happened. You can confirm the group is scheduled for deletion by clicking into the group and looking at the banner near the top.
This UX issue will be addressed in #443838 (closed)
Screenshots or screen recordings
Screen_Recording_2024-02-29_at_1.34.08_PM
How to set up and validate locally
Setup Organizations
- Access
rails c
- Enable Feature Flag
Feature.enable(:ui_for_organizations)
- Create the default organization and add root to it
you = User.find_by_username('root')
default_organization = Organizations::Organization.default_organization
Organizations::OrganizationUser.create!(organization_id: default_organization.id, user_id: you.id)
Testing
- Create a test group (or you can use an existing one)
- Navigate to the GDK home page
ex: 127.0.0.1:3000/
- Click Organizations in the sidebar
- Click the Default Organization
- Click the Manage > Groups and projects in the sidebar
- Switch list to Groups in the dropdown
- Click the ... on the project you want to delete
- Ensure modal appears and button is disabled
- Enter group full name and ensure button is enabled
- Click delete button
- Ensure button switches to loading state (may be very quick)
- Ensure list reloads and please see Important UX Note above
- Click into group that you just "deleted"
- Ensure it has banner noting it is now scheduled for deletion
Related to #421473 (closed)