Make notes vuex store namespaced

The following discussion from !34432 (merged) should be addressed:

  • @mrincon started a discussion:

    Suggestion (for follow up): It took me a while to understand why this didn't work:

    ...mapState('notes', ['selectedCommentPosition', 'selectedCommentPositionHover']),

    It turns out it's because the notes module is not namespaced (namespaced: true).

    Is there a reason for this? I see some other instances where you had to use getters or other "tricks" to map to it. On the other hand diffs is namespaced.

    Is this something we could follow up? I think it's the reason why some of these extra getters have been added to: app/assets/javascripts/notes/stores/getters.js, I think it could help clean up the code.

Edited Jul 14, 2021 by André Luís
Assignee Loading
Time tracking Loading