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.js file to ee/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 fetchContributedMembers action
    • Add an initialize action that sets initial state and the memberContributionsPath and should dispatch the fetchContributedMembers action
    • Add actions for setColumns, setMembers and sortMembers
    • 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 Aug 12, 2022 by Ezekiel Kigbo
Assignee Loading
Time tracking Loading