Skip to content

feat(reviews): build Leave Review modal component (#420) - #459

Merged
ayshadogo merged 1 commit into
Dfunder:mainfrom
oladev2026-tech:420-leave-review-modal
Jul 29, 2026
Merged

feat(reviews): build Leave Review modal component (#420)#459
ayshadogo merged 1 commit into
Dfunder:mainfrom
oladev2026-tech:420-leave-review-modal

Conversation

@oladev2026-tech

Copy link
Copy Markdown
Contributor

Summary

Adds app/components/reviews/LeaveReviewModal.tsx matching the issue: a self-contained modal that lets a client leave a star rating (1–5) plus a written review for an artist they hired.

Notes

  • Wraps the existing Modal portal so we inherit focus trapping, Escape-to-close, and ARIA dialog behavior for free.
  • Star selector is implemented as a role="radiogroup" with five role="radio" buttons; aria-checked reflects the chosen value and a live region announces the current selection.
  • Comment textarea enforces a 5-character minimum client-side before submit is enabled. Submit is also blocked if no star is selected.
  • Submission is mocked with a 600 ms timeout + react-hot-toast confirmation. Swap for POST /api/reviews when that endpoint ships.
  • Props: isOpen, onClose, optional artistName (defaults to 'the artist'), optional onSubmitted for the page-level hook.
  • No consumer-page wiring in this PR — the modal is exported as a standalone component so the artist profile / commission detail pages can import it in a follow-up.

Closes #420

Adds app/components/reviews/LeaveReviewModal.tsx wrapping the project's existing Modal portal. Includes a 1–5 clickable star rating (radiogroup + aria-checked + arrow-key friendly), a required comment textarea with a 5-character minimum, and a submit button that runs a mocked 600 ms timeout then toasts and closes. Component takes isOpen/onClose + optional artistName/onSubmitted props so any consumer page can drop it in. Stars/hover behavior, focus rings, and form validation are all in-page state — no backend wiring yet.

Closes Dfunder#420
@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@oladev2026-tech Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@ayshadogo ayshadogo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks OK to me

@ayshadogo
ayshadogo merged commit cd09c2a into Dfunder:main Jul 29, 2026
@grantfox-oss grantfox-oss Bot mentioned this pull request Jul 29, 2026
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.

Build leave review modal

2 participants