Skip to content

fix(ActivityComments): fix sorting comments, upvote/downvote & feedback tab issues#4585

Open
somramnani wants to merge 8 commits intodevelopmentfrom
som-fix/engagement-comments-issues
Open

fix(ActivityComments): fix sorting comments, upvote/downvote & feedback tab issues#4585
somramnani wants to merge 8 commits intodevelopmentfrom
som-fix/engagement-comments-issues

Conversation

@somramnani
Copy link
Copy Markdown
Contributor

@somramnani somramnani commented Dec 19, 2025

Description

Screenshot 2025-12-19 at 4 35 01 PM

Related PRS:

This frontend PR is related to the backend development branch.
Related PRs: PR4196, PR4135

Main changes explained:

ActivityComments.jsx:

  • Added client-side sorting for activity comments with a toggle between Newest and Oldest.
  • Introduced a derived sortedComments list based on createdAt to ensure comments render in the selected order without mutating state.
  • Updated the sort button UI to display the active sort type and allow toggling via a single control.
  • Wired up upvote and downvote actions to update comment counts in state.
  • Fixed the “helpful” feedback behavior to properly toggle likes on repeat clicks instead of incrementing indefinitely.
  • Refactored feedback sorting to use a consistent timestamp (createdAt) with safer date handling for all sort modes (Newest, Oldest, Highest Rated, Lowest Rated).

How to test:

  1. Check into current branch
  2. Do npm install and npm run start:local to run this PR locally
  3. Clear site data/cache
  4. Login as admin user
  5. Go to the URL /communityportal/activity/1/engagement/Comments
  6. In the Comments tab check:
    - if the Sorting functionality works
    - if the Upvote/Downvote functionality works
  7. In the Feedback tab check:
    - if the Newest first and Oldest first filtering works
    - if the Thumbs button increases or decrease when clicking instead of having the count keep increasing

Screenshots or videos of changes:

Sorting:

PR.4585-Demo.mov

Upvoting and Downvoting:

PR.4585-Upvoting-Downvoting.mov

Newest/Oldest Filtering:

Screen.Recording.2025-12-22.at.4.11.16.PM.mov

Thumbs Up in Feedback Tab:

PR.4585-Thumbs-Up-Demo.mov

Dark Mode:

Screen.Recording.2026-03-19.at.6.23.02.PM.mov

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 19, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 3fceb0a
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69bc7726da12da000774c1dc
😎 Deploy Preview https://deploy-preview-4585--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@somramnani somramnani changed the title fix(ActivityComments): fix sorting comments fix(ActivityComments): fix sorting comments, upvote/downvote & feedback tab issues Dec 19, 2025
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@beblicarl beblicarl left a comment

Choose a reason for hiding this comment

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

This functionality works as intended, however, on darkmode it isn't visible enough

https://www.loom.com/share/2ba223f3ccea4c96b832275f6daa8b06

https://www.loom.com/share/f2f04d61bea54763aa71ac5b19ae71e4

@somramnani somramnani added the do not review Do not review or look at code without full context label Feb 26, 2026
@sonarqubecloud
Copy link
Copy Markdown

@somramnani somramnani removed the do not review Do not review or look at code without full context label Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants