Convert GroupMemberStore to Vuex
Background
This is a follow-up of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8256#note_115517610:
GroupMemberStore should be refactored to use Vuex.
Implementation plan
This would be best handled in multiple MRs, an approach could be:
- Initialize the new Vuex store
-
Add a state.jsfile toee/app/assets/javascripts/group_member_contributions/store -
Include all the keys under this.state -
Add an additional state key for the memberContributionsPath
-
- Add mutations and actions
-
Add a fetchContributedMembersaction -
Add an initializeaction that sets initial state and thememberContributionsPathand should dispatch thefetchContributedMembersaction -
Add actions for setColumns,setMembersandsortMembers -
Add related mutations for each action + mutation types -
Add related tests for each mutation and each action
-
- Swap over to the new vuex store
-
Replace the existing store and dispatch the initialize action -
Bind new vuex state + actions to the app.vue component
-
Note: Transforming the get methods would be optional, I'm not sure there's much more benefit than mapping to the state in this case
Edited by Ezekiel Kigbo