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
- The groups and projects views are currently using a mock GraphQL resolver with mock data. This will be swapped out for a real GraphQL query in Project dashboard - Swap mock GraphQL query for... (#421441 - closed) and Group dashboard - Swap mock GraphQL query for r... (#420777 - closed). The
Edit
action may have the wrong URL depending on your GDK setup because the mock data uses http://127.0.0.1:3000/.
Screenshots or screen recordings
No visual changes, expected to look the same
Before | After |
---|---|
How to set up and validate locally
GDK
- Open Rails console
bin/rails console
- Enable the feature flag
Feature.enable(:ui_for_organizations)
- Create an organization
FactoryBot.create(:organization, name: 'GitLab', path: 'gitlab')
- Navigate to
/-/organizations/gitlab/groups_and_projects?display=projects
Storybook
You can view the ListActions
component in storybook with the following:
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.
-
I have evaluated the MR acceptance checklist for this MR.