Move some shared code to `members` directory [RUN AS-IF-FOSS]
requested to merge 281815-convert-project-members-list-view-from-haml-to-vue-setup-vue-application into master
What does this MR do?
In &4233 (closed) we converted the group members view from HAML to Vue to improve the UX. Now I am working on giving the same treatment to the project members view. I am finding some code that was originally put in the groups/members
directory but I am realizing this code can be used for the project members view. This MR moves that code from groups/members
directory to the members
directory.
Summary of changes
- Move
app/assets/javascripts/groups/members/components/app.vue
toapp/assets/javascripts/members/components/app.vue
- Move a few shared utilities from
app/assets/javascripts/groups/members/utils.js
toapp/assets/javascripts/members/utils.js
- Move a few shared constants from
app/assets/javascripts/groups/members/constants.js
toapp/assets/javascripts/members/constants.js
- Move a few shared EE utilities from
ee/app/assets/javascripts/groups/members/utils.js
toee/app/assets/javascripts/members/utils.js
- Rename
data-group-id
todata-source-id
in !51520 (diffs)- For group members this value is
group.id
. For project members this value will beproject.id
.source
is a naming convention that is used on the backend so seems like the best name here.
- For group members this value is
- Rename
linked_groups_data_json
andlinked_groups_list_data_attributes
helper methods togroup_group_links_data_json
andgroup_group_links_list_data_attributes
.- To better match the naming convention used by the backend in the
group_group_link
model. Also to avoid name clashing when we add the project member helpers. The project member helper names will beproject_group_links_data_json
andproject_group_links_list_data_attributes
- To better match the naming convention used by the backend in the
Screenshots (strongly suggested)
No visual changes. Screenshots below for context:
Before | After |
---|---|
Local testing
- Create a group
- Navigate to
Group
->Members
How to add a group
- Navigate to
Group
->Members
- Click the
Invite group
tab
How to add an invited member
- Navigate to
Group
->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
How to request access to a project
- Log in (or impersonate) a user that doesn't already have access to the group
- Navigate to the group overview
- Click
Request access
located below the project name
Does this MR meet the acceptance criteria?
Conformity
- [-] Changelog entry
- Not needed, 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
Related to #281815 (closed)
Edited by Peter Hegman