fix Vuex module structre for diffs and notes
What does this MR do?
Fixes a bunch of failing karma specs, and structures stores/modules as described in https://vuex.vuejs.org/en/structure.html
makes it easier to import/use the Stores in Components.
Rules:
-
./stores/index.js
should export a Vuex store - components should not instantiate stores
- modules like in
modules
subfolder
Are there points in the code the reviewer needs to double check?
Not sure if actions/getters/mutations should be part of mutations or store, but being on module means they don't have to be imported whenever that module is used.
i.e. it makes sense that the diffs module contains both diffViewType
in state and a setDiffViewType
action, since you will always want to use them together.
Why was this MR needed?
ease of use, and consistency with docs
Does this MR meet the acceptance criteria?
-
Tests added for this feature/bug - Review
-
Has been reviewed by UX -
Has been reviewed by Frontend -
Has been reviewed by Backend -
Has been reviewed by Database
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Squashed related commits together -
Internationalization required/considered -
End-to-end tests pass ( package-and-qa
manual pipeline job)