Skip to content

feat(admin): replace window.prompt with proper modal for required review comments #2004

@cdcore09

Description

@cdcore09

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 in apps/admin/src/components/)
  • Replace the two window.prompt calls 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions