Skip to content

Fix/comment deleting with activities installed - #45848

Merged
ChristophWurst merged 1 commit into
masterfrom
fix/comment-deleting-with-activities
Jul 15, 2024
Merged

Fix/comment deleting with activities installed#45848
ChristophWurst merged 1 commit into
masterfrom
fix/comment-deleting-with-activities

Conversation

@GVodyanov

@GVodyanovGVodyanov commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

Summary

Fixes issue where you:

  • Delete a comment
  • Add a new comment before the old comment gets deleted in the back-end
  • See deleted comment again

TODO

  • Add store for synchronizing deleted comments between the mixin and activities

Checklist

@GVodyanovGVodyanov added the 2. developing Work in progress label Jun 13, 2024
@GVodyanovGVodyanov self-assigned this Jun 13, 2024
@GVodyanovGVodyanov changed the title fix(comments): comment deleting with activities installedFix/comment deleting with activities installedJun 13, 2024
@GVodyanov
GVodyanov marked this pull request as ready for review June 17, 2024 10:35
@GVodyanovGVodyanov added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Jun 17, 2024
@susnux
susnux requested a review from ShGKmeJune 17, 2024 12:05
Comment threadapps/comments/src/comments-activity-tab.ts

@ShGKmeShGKme left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think it makes sense to introduce a global storage in the app just to store ids or deleted comments in 2-3 components.

If storing deleted state in the comment it self is a problem, it's enough to store it in the parent.

Besides, it seems that the initial issue is that adding a comment triggers an entire tab reload through loading state. What's when Comment instances are being destroyed and re-mounted without old deleted state.

@solracsfsolracsf added this to the Nextcloud 30 milestone Jun 18, 2024
@GVodyanov

GVodyanov commented Jun 18, 2024

Copy link
Copy Markdown
ContributorAuthor

@ShGKme Would you have any suggestions on how to not make the tab reload then? I'm having trouble figuring out the activities API, thank you :)

@ShGKme

Copy link
Copy Markdown
Contributor

So, I made a deeper look at the app.

With activity app case it is indeed not possible to store data in the parent, because on the Activity tab there is no parent between comments and the form. Every comment is a new Vue app. So, as a simple workaround from the server side, it is a good workaround.

A better solution would be to adjust Activity API to not reload everything on change. But with the current approach, it is not so simple.

So, let's fix Ferdinand's suggestion and go with it for now

cc @GretaD

@susnux

Copy link
Copy Markdown
Contributor

A better solution would be to adjust Activity API to not reload everything on change. But with the current approach, it is not so simple.

💯 agree

@GretaD
GretaD requested review from ShGKme and susnuxJuly 1, 2024 11:29
@GretaD
GretaDforce-pushed the fix/comment-deleting-with-activities branch from 794c0bd to 68ba038CompareJuly 1, 2024 13:04
@GretaD

Copy link
Copy Markdown
Contributor

/backport to stable28

@GretaD

Copy link
Copy Markdown
Contributor

/backport to stable29

@GretaD

Copy link
Copy Markdown
Contributor

/compile amend /

@nextcloud-command
nextcloud-commandforce-pushed the fix/comment-deleting-with-activities branch from 68ba038 to f60b4f5CompareJuly 8, 2024 09:14
@GretaD

Copy link
Copy Markdown
Contributor

/compile amend /

@nextcloud-command
nextcloud-commandforce-pushed the fix/comment-deleting-with-activities branch from f60b4f5 to 243d763CompareJuly 8, 2024 09:47
@ChristophWurst

Copy link
Copy Markdown
Member

The branch is outdated. Other PRs touched the frontend bundles. It will need a rebase and a recompile.

@GretaD
GretaDforce-pushed the fix/comment-deleting-with-activities branch from 243d763 to 52ab6a0CompareJuly 8, 2024 09:58
@ChristophWurstChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jul 8, 2024
@GretaD

Copy link
Copy Markdown
Contributor

/compile amend /

@nextcloud-command
nextcloud-commandforce-pushed the fix/comment-deleting-with-activities branch from 52ab6a0 to 79aac6eCompareJuly 8, 2024 10:31
@susnuxsusnux added the bug label Jul 9, 2024
@susnux
susnuxforce-pushed the fix/comment-deleting-with-activities branch from 79aac6e to 01cce6eCompareJuly 9, 2024 17:37
@susnux

Copy link
Copy Markdown
Contributor

@GVodyanov

/home/runner/actions-runner/_work/server/server/apps/comments/src/store/deletedCommentLimbo.js
Error: 6:1 error Expected space or tab after '//' in comment spaced-comment

@GretaD

Copy link
Copy Markdown
Contributor

/compile amend /

@nextcloud-command
nextcloud-commandforce-pushed the fix/comment-deleting-with-activities branch from 094b38e to c4422cdCompareJuly 15, 2024 10:44
@ChristophWurst

Copy link
Copy Markdown
Member

conflicts -> needs rebase + rebuild

@GVodyanov
GVodyanovforce-pushed the fix/comment-deleting-with-activities branch 2 times, most recently from a52fcf2 to 6123505CompareJuly 15, 2024 12:37
@ChristophWurst

Copy link
Copy Markdown
Member

/compile amend /

Signed-off-by: Grigory Vodyanov <scratchx@gmx.com>
Signed-off-by: Grigory V <scratchx@gmx.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@nextcloud-command
nextcloud-commandforce-pushed the fix/comment-deleting-with-activities branch from 6123505 to bd7c29cCompareJuly 15, 2024 13:38
@ChristophWurst
ChristophWurst merged commit 8c571dd into masterJul 15, 2024
@ChristophWurst
ChristophWurst deleted the fix/comment-deleting-with-activities branch July 15, 2024 14:20
@welcome

welcomeBot commented Jul 15, 2024

Copy link
Copy Markdown

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@backportbot

Copy link
Copy Markdown

The backport to stable29 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable29
git pull origin stable29
# Create the new backport branch
git checkout -b backport/45848/stable29
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts, resolve them
git cherry-pick bd7c29c3
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/45848/stable29

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot

Copy link
Copy Markdown

The backport to stable28 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable28
git pull origin stable28
# Create the new backport branch
git checkout -b backport/45848/stable28
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts, resolve them
git cherry-pick bd7c29c3
# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/45848/stable28

Error: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@susnux

Copy link
Copy Markdown
Contributor

The backport to stable28 failed. Please do this backport manually.

When doing the backports @GVodyanov please directly include #46643

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

Labels

4. to releaseReady to be released and/or waiting for tests to finishbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@GVodyanov@ShGKme@susnux@GretaD@ChristophWurst@solracsf@skjnldsv