Skip to content

Refactor projects list actions to a standalone component

What does this MR do and why?

The grouptenant scale team is starting to build out an Organization MVC. For more information about what an "Organization" will be see https://docs.gitlab.com/ee/user/organization/ and https://docs.gitlab.com/ee/architecture/blueprints/organization/#organization-mvc

In !128540 (merged) we added actions to the organizations project list. We want to add actions to the organizations group list and share some of the logic but the current setup makes it hard. This MR refactors the actions to a shared ListActions component that will be able to be used in ProjectsListItem and GroupsListItem components (and any other lists in the future).

Notes

Screenshots or screen recordings

No visual changes, expected to look the same

Before After
Screenshot_2023-08-15_at_12.09.49_PM Screenshot_2023-08-15_at_12.09.23_PM

How to set up and validate locally

GDK

  1. Open Rails console
    • bin/rails console
  2. Enable the feature flag
    • Feature.enable(:ui_for_organizations)
  3. Create an organization
    • FactoryBot.create(:organization, name: 'GitLab', path: 'gitlab')
  4. Navigate to /-/organizations/gitlab/groups_and_projects?display=projects

Storybook

You can view the ListActions component in storybook with the following:

  1. cd storybook && yarn start

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