-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: move spaces to pinia store #10316
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
b868659
to
331435d
Compare
@@ -4,16 +4,12 @@ import auth from './auth' | |||
import config from './config' | |||
import user from './user' | |||
import navigation from './navigation' | |||
import spaces from './spaces' | |||
|
|||
const strict = process.env.NODE_ENV === 'development' |
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.
This causes issues because spaces are now sitting in pinia store (spaces store) as well as in vuex store (files store). Since this only affects dev environments and we will get rid of vuex eventually, I'd propose to disable strict mode.
Removes the vuex spaces store module and adds a pinia store for spaces instead. Note that this is a breaking change for developers!
331435d
to
4e17e14
Compare
Quality Gate failedFailed conditions 45.38% Condition Coverage on New Code (required ≥ 50%) |
💖💖💖 |
refactor: move spaces to pinia store
Description
Removes the vuex spaces store module and adds a pinia store for spaces instead. The pinia store can be accessed via the new
useSpacesStore()
composable.The spaces store could still be refactored a little bit, but I wanted to keep the scope here as small as possible. What I don't like is that the store doesn't feel consistent to me. E.g. The method
addSpaces
simply adds given spaces to the store, whereasaddSpaceMembers
does not only add space members to the store, but does also requests to the server.Note that this is a breaking change for developers!
Related Issue
Types of changes