Skip to content

introduce first pinia store#7790

Open
grnd-alt wants to merge 1 commit intomainfrom
feat/pinia-migration
Open

introduce first pinia store#7790
grnd-alt wants to merge 1 commit intomainfrom
feat/pinia-migration

Conversation

@grnd-alt
Copy link
Copy Markdown
Member

@grnd-alt grnd-alt commented Mar 24, 2026

To eventually migrate to vue3 we should first introduce pinia.
luckily, we can use pinia and vuex at the same time so we can do rather easy partial migrations.

This pr shows how to do that by copying the boardStore we had in main.js before to it's own store.

The vuex stores depend on each other so some of them have to be migrated at the same time to not break things. The actionsStore however does not have any dependencies and no other store depends on it so it can be easily migrated in one step.

migration plan for other pinia stores

Store Reads From (rootState/getters) Commits To (other modules)
attachment.js rootState.currentBoard cardSetAttachmentCount, cardIncreaseAttachmentCount, cardDecreaseAttachmentCount
card.js rootState.filter, rootState.stack.stacks, getters.stackById, getters.getSearchQuery addStack, addBoard
stack.js this.state.showArchived, this.state.currentBoard, rootState.card.cards setCards, moveStackToTrash, updateCardProperty
trashbin.js None addStack, addCard
overview.js None setCurrentBoard, addCard
main.js All modules Provides currentBoard, filter, showArchived, board mutations
dashboard.js None None
comment.js None None
actions.js None None

dashboard, comment and actions (this pr) can be migrated it self
the others most likely have to be migrated together (we could write to vuex store from pinia as a workaround, but I don't think we should)

@grnd-alt grnd-alt changed the title introduce pinia first stores introduce first pinia stores Mar 24, 2026
@grnd-alt grnd-alt force-pushed the feat/pinia-migration branch from 198adf2 to 0b11f3b Compare March 24, 2026 16:06
@grnd-alt grnd-alt marked this pull request as draft March 24, 2026 16:13
@grnd-alt grnd-alt force-pushed the feat/pinia-migration branch 3 times, most recently from 3418bc9 to a639fd3 Compare March 24, 2026 16:46
@grnd-alt grnd-alt marked this pull request as ready for review March 25, 2026 08:23
@grnd-alt grnd-alt requested review from blizzz and mejo- March 25, 2026 08:24
@grnd-alt grnd-alt mentioned this pull request Mar 25, 2026
5 tasks
@grnd-alt grnd-alt force-pushed the feat/pinia-migration branch 2 times, most recently from 19b171d to eb53f25 Compare March 30, 2026 09:31
@grnd-alt grnd-alt changed the title introduce first pinia stores introduce first pinia store Mar 30, 2026
@grnd-alt grnd-alt force-pushed the feat/pinia-migration branch from eb53f25 to dd050db Compare March 30, 2026 09:44
@grnd-alt grnd-alt requested a review from mejo- March 31, 2026 08:25
Copy link
Copy Markdown
Member

@mejo- mejo- left a comment

Choose a reason for hiding this comment

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

Code changes look good now ☺️ Didn't test though.

@grnd-alt grnd-alt mentioned this pull request Mar 31, 2026
5 tasks
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.

2 participants