Skip to content

[Feature] Replace native window.confirm() for note deletion with a styled confirmation modal #97

Description

@Gunjan10-droid

Problem Statement

Both NoteDetailPage.jsx and NoteCard.jsx currently delete a note using the browser's native window.confirm("Are you sure you want to delete this note?"). This is a jarring, unstyled system popup that breaks out of ThinkBoard's UI entirely — it doesn't match the app's theme (light/dark mode, Tailwind styling), can't be customized, and is inconsistent with the direction the app is already heading. Deleting a note — a destructive, irreversible action — deserves better UX than a generic browser alert.

Proposed Solution

Add a reusable ConfirmModal component (styled with Tailwind, respecting the app's dark/light theme) that:

  • Shows the note title being deleted for clarity ("Delete 'Grocery List'?")
  • Has clearly labeled "Cancel" and "Delete" buttons (Delete styled in destructive red)
  • Closes on outside click / Escape key
  • Replaces the window.confirm(...) calls in both NoteDetailPage.jsx and NoteCard.jsx

Affected Area

  • UI / UX
  • New component
  • New page
  • Analytics / Charts
  • Authentication
  • Other:

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions