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 icon colored with no new comments #573

Closed
fosterfarrell9 opened this issue Dec 19, 2023 · 3 comments
Closed

Comments icon colored with no new comments #573

fosterfarrell9 opened this issue Dec 19, 2023 · 3 comments

Comments

@fosterfarrell9
Copy link
Collaborator

It appears that #515 contains a bug: In production I just posted an answer to a user comment on one of my media, and now I have a yellow comment icon in the navbar indicating that there are new comments, while clicking on the icon shows there are none:

new_comments

There is no way to decolor the yellow icon (only waiting until someone posts a new commmment somewhere and the clearing all commments). This is actually something we wanted to avoid in #515 but for some reason, it does not work.

@fosterfarrell9
Copy link
Collaborator Author

fosterfarrell9 commented Dec 19, 2023

I can reproduce it in development. Starting scenario: Teacher has no unread comments. Student posts new comment for a medium that does not have a comment yet (I could not reproduce it with a medium that had previuos comments). Teacher's new_comment icon in the navbar turns yellow. Teacher replies to the comment. Then Teacher clicks on the yellow new_comments icon and finds that it does not show anything.
This is actually pretty much a standard scenario, I wonder how we missed it at the time.

@fosterfarrell9
Copy link
Collaborator Author

fosterfarrell9 commented Dec 19, 2023

A quick inspection of the code in comments_controller.rb shows that at no point in the workflow described above the unread_comments flag for the Teacher user is set to false. Probably one should do that around line 218. For the corresponding check we have to incorporate all threads, not just the one considered in the comments_controller#create action.

@fosterfarrell9
Copy link
Collaborator Author

Closed via #585, #587, #594.

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 a pull request may close this issue.

1 participant