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

Add anonymous avatar to anonymous replies #36

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

joonhoswe
Copy link
Contributor

@joonhoswe joonhoswe commented Feb 26, 2025

Added an anonymous avatar for anonymous quick replies and styled the anonymous quick reply button

Files Changed:

  • nodebb-theme-harmony/templates/partials/topic/post.tpl
  • High-level summary: This .tpl file is responsible for displaying the frontend for each specific reply and post, and reads data from the database to get user information and post content.
  • Modifications: Edited the existing conditional which rendered the avatar and username when !posts.anonymous to now display the anonymous avatar when posts.anonymous is true.
  • nodebb-theme-harmony/templates/partials/topic/quickreply.tpl
  • High-level summary: This .tpl file is responsible for displaying the frontend of the quick reply button, and posts a reply consisting of the content written in the text box at that time.
  • Modifications: Edited the styling of the button to be grey to differentiate from the regular quick reply and add the anonymous avatar.
  • Testing: Ran the linter and CoverAlls test, did not significantly decrease code coverage. Additionally, @savannahxunc tested locally on her machine.
  • How a user can test this: If a user simply goes to a post, types a reply, and clicks Anonymous Reply, they will see that their avatar and username have been hidden.

Video Demo:

Anonymous.Reply.Improved.UI.mp4

Newly styled anonymous avatar for anonymous quick replies:
Screenshot 2025-02-26 at 2 08 16 PM

Newly styled anonymous reply button:
Screenshot 2025-02-26 at 2 08 11 PM

Issue Link: resolves #37

@joonhoswe joonhoswe self-assigned this Feb 26, 2025
@joonhoswe joonhoswe added the enhancement New feature or request label Feb 26, 2025
@joonhoswe joonhoswe added this to the Sprint 2 milestone Feb 26, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 13551516450

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.01%) to 82.6%

Files with Coverage Reduction New Missed Lines %
src/meta/errors.js 1 76.74%
src/middleware/ratelimit.js 2 77.42%
Totals Coverage Status
Change from base Build 13534520365: -0.01%
Covered Lines: 22377
Relevant Lines: 25666

💛 - Coveralls

Copy link
Contributor

@savannahxunc savannahxunc left a comment

Choose a reason for hiding this comment

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

Wow Jonathan, this is so cool! Thanks for implementing this and making the UI look more sleek and usable! The video demo was also extremely helpful -- phenomenal work :)

@joonhoswe joonhoswe merged commit 73ba8a7 into main Feb 26, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an anonymous avatar and refactor styling for anonymous quick reply
3 participants