enhancement: Replace browser confirm dialogs with custom modal for delete actions
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
ConfirmModalcomponent infrontend/src/components/ - Replace calls to
window.confirmwith 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.
@archa8 I am ready to work on this issue.
Assigned @tanmaygautam11
I will love to fix this issue please Assign it to me