Skip to content

Conversation

@luka-nextcloud
Copy link
Contributor

@luka-nextcloud luka-nextcloud commented Nov 20, 2025

Summary

Refactors the Vuex store setup to use factory functions for creating new store instances. This change allows Board reference widgets to maintain separate store instances, resolving the issue where loading multiple board widgets would always load the same board.

Store architecture refactor:

  • Changed store/main.js to export a storeFactory function that returns a new Vuex store instance, instead of exporting a singleton store. All imports and usages of the store are updated to use storeFactory().

  • Refactored store/stack.js and store/card.js to export factory functions (stackModuleFactory, cardModuleFactory) that return new module objects, replacing singleton module exports.

Widget and component store usage:

  • Updated components and widgets (e.g., BoardReferenceWidget.vue, widget registration in init-reference.js) to use new store instances by calling storeFactory()

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required


let syncRunning = false

const store = storeFactory()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could it be problematic here that we are not using the same instance as in the main app?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple embed board widgets only show same board

3 participants