Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comments sent for a file before changing to another one may be shown in the new one #12648

Closed
danxuliu opened this issue Nov 24, 2018 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: comments needs info

Comments

@danxuliu
Copy link
Member

Note that the comment is actually stored in the server in the proper file; the problem is only related to the visualization of the comment in the browser.

When opening the details view for a different file CommentsTabView.setFileInfo is called. Although this resets the collection and thus removes the existing models/comments, reset does not abort the current pending requests (see pull 1325 in https://github.com/jashkenas/backbone (I am not linking it directly to prevent the reference from polluting that thread)). Thus, when the response for the creation of a new message is received it is handled in the regular way, that is, adding the model for the new comment to the collection, which causes it to be rendered in the list of comments, even if the request was originally done before the collection was reset.

@nextcloud/javascript

How to test:

  • Make fetching comments a bit slower by adding sleep(3) to the beginning of getChild() in apps/dav/lib/Comments/RootCollection.php
  • Open the Files app
  • Create two files (or folders)
  • Open the Comments tab in the details view for the first file
  • Send a new comment
  • Open the details view for the other file immediately after sending the comment, without waiting for it to be shown for the first file

Expected result:
The No comments yet message is eventually shown

Actual result:
The first message is eventually shown, even if the current file is the second one

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #4363 (Conflict dialogue doesn't show preview for new file any more), #1583 (occ files:scan -all Makes all folders show that they were just changed.), #8012 (Add an option to change or remove default new profile files), #11115 (Recopy should provide Skip all existing file and copy new one), and #7414 (Input field for comments no longer shows warnings about comment length).

@skjnldsv skjnldsv added the 0. Needs triage Pending check for reproducibility or if it fits our roadmap label Jun 12, 2019
@danxuliu danxuliu added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 26, 2020
@szaimen
Copy link
Contributor

szaimen commented Jan 9, 2023

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 9, 2023
@szaimen szaimen closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: comments needs info
Projects
None yet
Development

No branches or pull requests

4 participants