Refactor how data is passed to group/project members Vue apps [RUN ALL RSPEC]
📖 What does this MR do?
Related to #324681 (closed) and part of &5616
Currently the group/project member pages are composed of 4 separate Vue applications that use Bootstrap tabs. We would like to move these into one Vue app so we can use GlTabs
and move towards deprecating Bootstrap tabs. Currently the data is passed to the Vue applications via multiple data-*
attributes. Each data-*
attribute is parsed separately before being passed to the Vue application. This makes it difficult to merge these 4 separate Vue applications into one because we run into name clashing between data-*
attributes. This MR changes how the data is passed to the Vue application by using one data attribute with a JSON string. This has the added benefit of not having to use parseBoolean
or parseInt
.
When we move to one Vue application we will be able to set the data-members-data
attribute to something like this as a JSON string:
{
user: {
members: [],
pagination: {},
member_path: '/groups/foo-bar/-/group_members/:id',
},
group: {
members: [],
pagination: {},
member_path: '/groups/foo-bar/-/group_links/:id',
},
invite: {
members: [],
pagination: {},
member_path: '/groups/foo-bar/-/group_members/:id',
},
access_request: {
members: [],
pagination: {},
member_path: '/groups/foo-bar/-/group_members/:id',
}
}
💻 Local testing
- Create a group or project and navigate to
Group or Project
->Members
Groups
tab
How to add a group to the - Navigate to
Group or Project
->Members
- Click the
Invite group
tab
Invited
tab
How to add an invited member to the - Navigate to
Group or Project
->Members
- In the
GitLab member or Email address
enter an email that a user does not already own - Click
Invite "example@test.com" by email
Access requests
tab
How to request access to the - Log in (or impersonate) a user that doesn't already have access to the group or project
- Navigate to the group or project overview
- Click
Request access
located below the project name
📷 Screenshots
No visual/functionality changes. All backstage
Screenshots for context:
Group members
Project members
🚦 Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because this is a developer facing change.
-
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team