Skip to content

Replace window.confirm() with AlertDialog for destructive actions #51

@zhiganov

Description

@zhiganov

Problem

PollView.jsx:301 uses confirm('Delete your availability?') — a native browser dialog for a destructive action. This is inconsistent with poll deletion which uses a proper DeletePollDialog.

The native confirm() dialog:

  • Looks different on every browser/OS
  • Can't be styled to match the app's design system
  • Creates anxiety — users see an unfamiliar, ugly dialog for a destructive action

Solution

Install @shadcn/alert-dialog and create a DeleteResponseDialog component (or reuse an inline AlertDialog pattern). AlertDialog prevents accidental dismiss (click outside / Escape won't close), which is the correct behavior for destructive confirmations.

Also: DeletePollDialog should use AlertDialog

DeletePollDialog.jsx:33 uses regular Dialog for poll deletion. Per shadcn conventions, destructive actions should use AlertDialog — it prevents accidental dismiss.

JTBD context

Confirm/Modify stages — destructive actions need clear, consistent confirmation to reduce anxiety.

Metadata

Metadata

Assignees

No one assigned

    Labels

    mobileMobile responsivenessuiUI/UX improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions