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

Chore/refactor store modules #11062

Merged
merged 3 commits into from
May 21, 2024

Conversation

rak-phillip
Copy link
Member

@rak-phillip rak-phillip commented May 20, 2024

Summary

This refactors the nuxtClientInit action so that mutations are explicitly invoked in the store instead of utilizing Object.defineProperty() to modify the root state.

Fixes #11081

Technical notes summary

Vue 3 wraps the store's state object with a proxy to make it reactive, and the proxy's target object has its properties marked as non-writable and non-configurable. In order to resolve this issue, we make use of accepted Vuex patterns for modifying state.

Areas or cases that should be tested

This is the core store module, so we will need to test anything that utilizes the $router, $route, and $plugin state that's defined within the store.

Areas which could experience regressions

Anything that accesses the $router, $route, or $plugin states stored in the store.

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
@rancher-ui-project-bot rancher-ui-project-bot bot added this to the v2.9.0 milestone May 21, 2024
@rak-phillip rak-phillip marked this pull request as ready for review May 21, 2024 20:00
@rak-phillip rak-phillip merged commit 48c5b25 into rancher:master May 21, 2024
36 checks passed
@rak-phillip rak-phillip deleted the chore/refactor-store-modules branch May 21, 2024 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade Vuex implementation to be compatible with Vue 3's reactivity system
2 participants