-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added anonymous checkbox option for users when quick replying and adjusted the published post to be set to a default, masked display if anonymous #18
Conversation
Most of your code looks fine but I don't think dump.rdb should be a part of any commits and should be removed. Also, your modification to src/posts/create.js line 37 will cause a lint error and should be reverted. Lastly, the log statements are unnecessary since your modifications appear to work. They should also be removed. As for the PR, you neglect to mention your changes to src/topics/create.js. Also, since all posts are being modified with the anonymous attribute, the feature is not complete and the PR should be labeled with WIP. You should also add the issue you are resolving to the end of the PR. |
…frontend and add this to the replyData
…eckbox on the front end form
…osts made with the anonymous attribute as true
…ges and the nodebb-theme-harmony post.tpl frontend code
…te is set correctly
…used anonymous attribute was added in the worng place
Pull Request Test Coverage Report for Build 13572575047Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR looks good and is very descriptive and the code looks perfectly fine to me. Unfortunately, dump.rdb is a relic of the local database and needs to be removed before you can commit to main. This should also be resolving issue #6 as well, right? Other than that you should be fine.
The PR looks good and follows guidelines. The changes Ryan mentioned have been made and the code is well organized and tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code is clear and well organized and passes the lint test. looks good
Context
Currently, when users reply to a post under a topic, there is no built-in mechanism for marking them as anonymous. This feature aims to allow users to quick reply under a post anonymously by clicking a checkbox. Under these conditions, the user's avatar, username, and all links to their profile will be masked to keep their identity fully private. This change is particularly useful for students who might feel embarrassed when asking questions, and it creates a safer learning environment overall.
Description
A checkbox labeled as "anonymous" was added next to the expand and submit buttons within the quick reply section of the page; This allows the user to toggle whether they want their quick reply post to be anonymous or not. The post is then edited so that the anonymous attribute is set to 'true' if the checkbox was marked upon submission of the post and set to 'false' if unmarked. If the anonymous attribute is set to 'true' in that post's data, the published post will have the username set to a default "Anonymous" and the avatar will be a default light gray circle; additionally, all links the the poster's profile (via their avatar or username) will be removed. If the anonymous attribute is set to 'false' in that post's data, the published post will display normally with all user information intact.
File Changes
src/posts/create.js
public/src/modules/quickreply.js
nodebb-theme-harmony/templates/partials/topic/post.tpl
Testing
Resolves Issue #7 #19 #6