feat(admin): replace window.prompt with proper modal for required review comments
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 33
- Forks
- 104
- Avg merge
- 12h 3m
- Merged PRs (30d)
- 10
Description
Summary
apps/admin/src/pages/events/EventDetailPage.tsx and apps/admin/src/pages/announcements/AnnouncementDetailPage.tsx use window.prompt to collect the required comment for reject and request_changes transitions. Works but UX is rough — no validation, no formatting, no cancel-without-typing, blocks the JS thread.
Requirements
- Build a reusable
<RequiredCommentModal>component (or use an existing modal primitive if one exists inapps/admin/src/components/) - Replace the two
window.promptcalls in EventDetailPage and AnnouncementDetailPage - Validate non-empty before submit; show inline error if empty
- Add to any future artifact detail page (Plan 4 forms, Plan 5 broadcast UIs)
Context
Flagged in the Plan 3 review. Forms (Plan 4) will add another detail page with the same pattern — fix before that lands so the new code copies the modal instead of window.prompt.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with apps/admin/src/pages/events/EventDetailPage.tsx and apps/admin/src/pages/announcements/AnnouncementDetailPage.tsx, then inspect apps/admin/src/components/ for an existing modal primitive. Trace the reject and request_changes transitions and replace both window.prompt calls with the reusable required-comment flow. Done means empty comments show an inline error, cancellation is possible, and both pages use the modal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100