-
Notifications
You must be signed in to change notification settings - Fork 63
Make most of the Vuex store modules namespaced #244
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent. Tests pass and everything is working. I went through a little manual integration test suite haha, and everything works as it should. What a large amount of work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the difference between this PR and #229?
isReportingBug() { | ||
return this.$store.state.isReportingBug | ||
}, | ||
bugReported() { | ||
return this.$store.state.bugReported | ||
}, | ||
bugReportFailed() { | ||
return this.$store.state.bugReportFailed | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a curiosity, but why were these not using mapState
before?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, probably because that was the understanding at the time of writing of this code.
Oh sorry, I should have read the description more closely. Never mind! |
# Conflicts: # src/components/NotificationBanner.vue # src/pages/search.vue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Code changes make sense and it tested well locally. Nice refactor!
Fixes
Related to #205 by @dhruv
Description
This PR moves most of the Vuex store modules from
store-modules
tostore
directory. This way, Nuxt creates namespaced modules out of them, which are easier to maintain.Technical details
To make the transition to namespaced modules more atomic, one large #229 is replaced with #242 and this PR. Also, the
filter-store
andsearch-store
are left as is because they are tightly coupled, and will be refactored in a later PR.There are two things that needed to be changed in every store module:
createAction
functions were added. This makes it possible to switch services with mocks when testing.Tests
Run the tests, and run the app to verify that no error messages appear in the console.
Checklist
Update index.md
).main
ormaster
).Developer Certificate of Origin
Developer Certificate of Origin