Skip to content

Migrate comment.js Vuex store to Pinia#7827

Merged
grnd-alt merged 5 commits into
mainfrom
migrate-comment-store-to-pinia
May 26, 2026
Merged

Migrate comment.js Vuex store to Pinia#7827
grnd-alt merged 5 commits into
mainfrom
migrate-comment-store-to-pinia

Conversation

@theoholl

@theoholl theoholl commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR migrated the comment.js Vuex store to Pinia, following patterns from #7790.

@theoholl theoholl marked this pull request as ready for review April 6, 2026 13:32

@grnd-alt grnd-alt 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.

did you test this? this breaks reactivity when deleting comments and when loading more comments than on initial fetch

@theoholl

Copy link
Copy Markdown
Contributor Author

Oh shoot, I'll review that. I thought I had tested deleting (adding, referencing, etc.) comments at least but I'll put this PR on hold until I tested more thoroughly.

@theoholl theoholl requested a review from grnd-alt April 16, 2026 09:19
@github-actions

Copy link
Copy Markdown
Contributor

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@grnd-alt grnd-alt 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.

@theoholl took me awhile to get to this, but here I am now!
this works great now, I have some small remarks but then we can get the next store to pinia 🥳

Comment thread src/stores/comment.js Outdated
await apiClient.createComment({ cardId, comment, replyTo: this.replyTo })
await this.fetchComments({ cardId })
},
async apiDeleteComment(data) {

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.

I don't see a need for these api wrappers, better just merge that into one action

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, currently there is no need to just add/remove/update comments from the state store without updating via API, so I merged those.

'hasMoreComments',
]),
replyTo() {
return this.commentStore.replyTo

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.

we can just use commentStore.replyTo, no need to have these extra computeds

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Makes sense to me.

@theoholl theoholl requested a review from grnd-alt May 16, 2026 22:28
theoholl added 5 commits May 26, 2026 11:11
Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com>
Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com>
Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com>
Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com>
Signed-off-by: Theo <36564257+theoholl@users.noreply.github.com>
@grnd-alt grnd-alt force-pushed the migrate-comment-store-to-pinia branch from 9f39122 to 9db9ea8 Compare May 26, 2026 09:17
@grnd-alt grnd-alt merged commit abeb4e5 into main May 26, 2026
37 checks passed
@grnd-alt grnd-alt deleted the migrate-comment-store-to-pinia branch May 26, 2026 09:28
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.

2 participants