Skip to content

fix: show confirmation popup for delete shortcut and add toast#100

Merged
DhanushNehru merged 6 commits into
DhanushNehru:mainfrom
JeevaRamanathan:jeeva/delete_shortcut_fix
Oct 31, 2025
Merged

fix: show confirmation popup for delete shortcut and add toast#100
DhanushNehru merged 6 commits into
DhanushNehru:mainfrom
JeevaRamanathan:jeeva/delete_shortcut_fix

Conversation

@JeevaRamanathan

Copy link
Copy Markdown
Contributor

Fixes #99

  • Refactors delete shortcut (Ctrl/Cmd+D) to show a confirmation dialog before deleting a note, matching the UI behavior of the delete button.
  • Adds toast notifications for note duplication and deletion, including the note title for clarity.

Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>
@vercel

vercel Bot commented Oct 28, 2025

Copy link
Copy Markdown

@JeevaRamanathan is attempting to deploy a commit to the Dhanush Nehru's projects Team on Vercel.

A member of the Team first needs to authorize it.

@JeevaRamanathan

Copy link
Copy Markdown
Contributor Author

Hi @DhanushNehru, could you please review this PR when you get a chance

@vercel

vercel Bot commented Oct 30, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
scratchpad-scribe Ready Ready Preview Comment Oct 31, 2025 2:42pm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a confirmation dialog for note deletion with enhanced user feedback. The changes ensure users confirm before deleting notes and provide clear feedback about which notes are being deleted or duplicated.

Key changes:

  • Added confirmation dialog with note title display for delete operations triggered via keyboard shortcut
  • Enhanced toast notifications to show the specific note title when deleting or duplicating notes
  • Updated existing delete confirmation dialogs in NoteCard and NoteEditor to display the note title

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/pages/Index.tsx Added delete confirmation dialog for keyboard shortcut deletion, implemented pendingDeleteId state management, and enhanced toast notifications with note titles
src/components/NoteEditor.tsx Updated delete confirmation dialog to display the note title being deleted
src/components/NoteCard.tsx Updated delete confirmation dialog to display the note title being deleted
Comments suppressed due to low confidence (1)

src/pages/Index.tsx:1

  • There are two consecutive question marks. The first '?' at the end of 'this note' should be removed since there's already a question mark after the closing span tag.
import { useState, useEffect, useCallback } from "react";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pages/Index.tsx Outdated
Comment thread src/pages/Index.tsx Outdated
Comment thread src/pages/Index.tsx Outdated
Comment thread src/components/NoteEditor.tsx Outdated
JeevaRamanathan and others added 5 commits October 30, 2025 20:42
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>
Signed-off-by: JeevaRamanathan <jeevaramanathan.m@infosys.com>
@JeevaRamanathan

Copy link
Copy Markdown
Contributor Author

Hi @DhanushNehru, updated as per copilot suggestion and fixed the conflicts

@DhanushNehru DhanushNehru merged commit 3bf2d54 into DhanushNehru:main Oct 31, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Delete shortcut doesn't show confirmation popup

3 participants