Skip to content
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

Merged
merged 1 commit into from
Jan 12, 2024
Merged

refactor: move spaces to pinia store #10316

merged 1 commit into from
Jan 12, 2024

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Jan 10, 2024

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, whereas addSpaceMembers 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@JammingBen JammingBen self-assigned this Jan 10, 2024
Copy link

update-docs bot commented Jan 10, 2024

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.

@JammingBen JammingBen mentioned this pull request Jan 10, 2024
11 tasks
@JammingBen JammingBen force-pushed the spaces-to-pinia branch 6 times, most recently from b868659 to 331435d Compare January 10, 2024 13:12
@JammingBen JammingBen marked this pull request as ready for review January 10, 2024 15:53
@@ -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'
Copy link
Contributor Author

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!
@JammingBen JammingBen added the Status:Needs-Review Needs review from a maintainer label Jan 11, 2024
Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

45.38% Condition Coverage on New Code (required ≥ 50%)

See analysis details on SonarCloud

@dschmidt
Copy link
Member

💖💖💖

@JammingBen JammingBen merged commit d223ede into master Jan 12, 2024
2 of 3 checks passed
ownclouders pushed a commit that referenced this pull request Jan 12, 2024
refactor: move spaces to pinia store
@JammingBen JammingBen mentioned this pull request Jan 19, 2024
7 tasks
@kulmann kulmann deleted the spaces-to-pinia branch September 5, 2024 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Needs-Review Needs review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants