paisable icon indicating copy to clipboard operation
paisable copied to clipboard

enhancement: Replace browser confirm dialogs with custom modal for delete actions

Open tanmaygautam11 opened this issue 1 year ago • 3 comments

Current Behavior

Currently, the app uses the native browser window.confirm dialog to confirm deletion of a transaction, category, budget, and account (see TransactionsPage.jsx, Budgets.jsx, SettingsPage.jsx). This dialog is not customizable and does not match the app’s look and feel.

Suggested Improvement

Replace all window.confirm dialogs used for destructive actions with a custom modal dialog component that matches the app’s UI. The modal should:

  • Clearly describe the action being confirmed (e.g., "Are you sure you want to permanently delete this transaction?")
  • Have visually distinct "Confirm" and "Cancel" buttons
  • Optionally, warn about permanent data loss where relevant

Update all relevant pages/components to use this modal, including:

  • TransactionsPage (single and bulk transaction deletion)
  • Budgets.jsx (budget deletion)
  • SettingsPage.jsx (account deletion)
  • Category deletion flows

Benefits

  • Improved user experience and accessibility
  • Consistent UI for all critical actions
  • Easier future customization (e.g., add warnings, style updates)

Possible Implementation

  • Create a reusable ConfirmModal component in frontend/src/components/
  • Replace calls to window.confirm with this modal and update logic accordingly
  • Ensure accessibility (keyboard navigation, focus trapping)

Alternatives Considered

  • Keeping browser confirm dialogs (less user-friendly)

Additional Notes

This is a UI enhancement and should not affect business logic.

tanmaygautam11 avatar Oct 09 '25 16:10 tanmaygautam11

@archa8 I am ready to work on this issue.

tanmaygautam11 avatar Oct 09 '25 16:10 tanmaygautam11

Assigned @tanmaygautam11

archa8 avatar Oct 09 '25 20:10 archa8

I will love to fix this issue please Assign it to me

Dammy010 avatar Oct 23 '25 20:10 Dammy010