Skip to content

Organizations - Delete groups from list

Zack Cuddy requested to merge 421473-organization-delete-group-from-list into master

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

  1. Access rails c
  2. Enable Feature Flag Feature.enable(:ui_for_organizations)
  3. 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

  1. Create a test group (or you can use an existing one)
  2. Navigate to the GDK home page ex: 127.0.0.1:3000/
  3. Click Organizations in the sidebar
  4. Click the Default Organization
  5. Click the Manage > Groups and projects in the sidebar
  6. Switch list to Groups in the dropdown
  7. Click the ... on the project you want to delete
  8. Ensure modal appears and button is disabled
  9. Enter group full name and ensure button is enabled
  10. Click delete button
  11. Ensure button switches to loading state (may be very quick)
  12. Ensure list reloads and please see Important UX Note above
  13. Click into group that you just "deleted"
  14. Ensure it has banner noting it is now scheduled for deletion

Related to #421473 (closed)

Merge request reports