Skip to content

introduce first pinia store - #7790

Merged
grnd-alt merged 1 commit into
mainfrom
feat/pinia-migration
Apr 1, 2026
Merged

grnd-alt merged 1 commit into
mainfrom
feat/pinia-migration

Conversation

@grnd-alt

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

Copy link
Copy Markdown
Member

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
2 of 5 tasks
Comment thread src/stores/actions.js Resolved
Comment thread src/stores/board.js Resolved
Comment thread src/stores/index.js Resolved
Comment thread src/stores/board.js Resolved
Comment thread src/stores/board.js Resolved
@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
Signed-off-by: grnd-alt <git@belakkaf.net>
@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

@mejo- mejo- left a comment

Copy link
Copy Markdown
Member

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
1 of 5 tasks
@grnd-alt
grnd-alt merged commit a7f21d6 into main Apr 1, 2026
36 checks passed
@grnd-alt
grnd-alt deleted the feat/pinia-migration branch April 1, 2026 12:47
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