Skip to content

feat: add "Mark as Solved" on Question posts with accepted answer flow#142

Open
MaheshN1821 wants to merge 2 commits into
ARUNNG2004:mainfrom
MaheshN1821:feat/mark-as-solved
Open

feat: add "Mark as Solved" on Question posts with accepted answer flow#142
MaheshN1821 wants to merge 2 commits into
ARUNNG2004:mainfrom
MaheshN1821:feat/mark-as-solved

Conversation

@MaheshN1821

Copy link
Copy Markdown
Contributor

What this PR does

Adds a "Mark as Solved" feature for Question-type posts, allowing the
post author to accept a specific comment as the answer.

Changes

  • app/dashboard/page.js — added handleMarkSolved handler that toggles
    solved and solvedCommentId fields on the post document in Firestore.
    Fires a "solved" notification to the comment author when accepted.

  • components/dashboard/PostCard.js — added ✓ Accept button on each
    comment (visible only to the post author on Question posts). Accepted
    comment gets a green highlight and "✓ Accepted Answer" label. Post card
    header shows a green "✓ SOLVED" badge when resolved.

  • components/dashboard/FeedColumn.js — forwards onMarkSolved prop
    through to PostCard.

  • components/Notifications.js — added "solved" notification type so
    the comment author gets notified when their answer is accepted.

Flow

  1. Author posts a Question
  2. Community replies via comments
  3. Author sees a ✓ Accept button next to each comment
  4. Clicking it marks that comment as the accepted answer and adds a
    green ✓ SOLVED badge to the post
  5. The action is toggleable — clicking again unmarks it
  6. Comment author receives an in-app notification

@netlify

netlify Bot commented Jun 27, 2026

Copy link
Copy Markdown

Deploy Preview for devconnectai ready!

Name Link
🔨 Latest commit a96920f
🔍 Latest deploy log https://app.netlify.com/projects/devconnectai/deploys/6a403072939b5e00083a9e1d
😎 Deploy Preview https://deploy-preview-142--devconnectai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 38
Accessibility: 97
Best Practices: 92
SEO: 100
PWA: -
View the detailed breakdown and full score reports

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

@ARUNNG2004

Copy link
Copy Markdown
Owner

@MaheshN1821 please add the screenshot images

@MaheshN1821

Copy link
Copy Markdown
Contributor Author
Screenshot 2026-06-28 105552 Screenshot 2026-06-28 105950 Screenshot 2026-06-28 110053

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 this pull request may close these issues.

2 participants