feat(reviews): build Leave Review modal component (#420) - #459
Merged
Conversation
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
|
@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! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
app/components/reviews/LeaveReviewModal.tsxmatching 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
Modalportal so we inherit focus trapping, Escape-to-close, and ARIA dialog behavior for free.role="radiogroup"with fiverole="radio"buttons;aria-checkedreflects the chosen value and a live region announces the current selection.react-hot-toastconfirmation. Swap forPOST /api/reviewswhen that endpoint ships.isOpen,onClose, optionalartistName(defaults to'the artist'), optionalonSubmittedfor the page-level hook.Closes #420