Recycle bin feature#47
Conversation
|
@siddxharth1 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. |
|
@DhanushNehru I've resolved the merge conflicts you can check |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR implements a recycle bin feature for the notes application, allowing users to soft delete notes that can be recovered later instead of permanent deletion.
- Added soft delete functionality with a
deletedflag to notes - Created a separate recycle bin page at
/recycle-binroute - Updated UI components to conditionally show different behavior based on whether user is on main notes page or recycle bin
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/note.ts | Added optional deleted boolean field to Note interface |
| src/pages/Index.tsx | Added deletePage prop and handleSoftDeleteNote function, updated delete handlers |
| src/hooks/useNotes.ts | Added softDeleteNote function for marking notes as deleted |
| src/components/NotesSidebar.tsx | Added recycle bin navigation, filtered notes by deleted status, updated UI labels |
| src/components/NoteEditor.tsx | Updated delete confirmation message based on page context |
| src/components/NoteCard.tsx | Updated delete confirmation message based on page context |
| src/App.tsx | Added new route for recycle bin page |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
| useEffect(() => { | ||
| setActiveNoteId(null); | ||
| }, [deletePage]) |
There was a problem hiding this comment.
Missing semicolon at the end of the useEffect dependency array.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
Hey @DhanushNehru , made the changes copilot suggested |
|
@DhanushNehru resolved the conflict again could you check |
|
Still a conflict exist @siddxharth1 |
|
@DhanushNehru resolved! |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Comments suppressed due to low confidence (1)
src/components/NoteCard.tsx:1
- [nitpick] The closing Button tag and conditional closing brace are improperly formatted on the same line. They should be on separate lines for better readability.
import { Note, formatTimestamp, getRelativeTime } from '@/types/note';
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@siddxharth1 please do fix the ci/cd checks too |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@DhanushNehru fixed the ci cd error |
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| onCreateNote={handleCreateNote} | ||
| onDuplicateNote={handleDuplicateNote} | ||
| onDelete={handleDeleteNote} | ||
| onDelete={ deletePage ? handleDeleteNote : handleSoftDeleteNote} |
There was a problem hiding this comment.
Missing space after opening brace in conditional expression. Should be onDelete={deletePage ? handleDeleteNote : handleSoftDeleteNote}
| note={activeNote} | ||
| onUpdate={updateNote} | ||
| onDelete={handleDeleteNote} | ||
| onDelete={ deletePage ? handleDeleteNote : handleSoftDeleteNote} |
There was a problem hiding this comment.
Missing space after opening brace in conditional expression. Should be onDelete={deletePage ? handleDeleteNote : handleSoftDeleteNote}
| onDelete={ deletePage ? handleDeleteNote : handleSoftDeleteNote} | |
| onDelete={deletePage ? handleDeleteNote : handleSoftDeleteNote} |
| note={activeNote} | ||
| onUpdate={updateNote} | ||
| onDelete={handleDeleteNote} | ||
| onDelete={ deletePage ? handleDeleteNote : handleSoftDeleteNote} |
There was a problem hiding this comment.
Missing space after opening brace in conditional expression. Should be onDelete={deletePage ? handleDeleteNote : handleSoftDeleteNote}
| onCreateNote={handleCreateNote} | ||
| onDuplicateNote={handleDuplicateNote} | ||
| onDelete={handleDeleteNote} | ||
| onDelete={ deletePage ? handleDeleteNote : handleSoftDeleteNote} |
There was a problem hiding this comment.
Missing space after opening brace in conditional expression. Should be onDelete={deletePage ? handleDeleteNote : handleSoftDeleteNote}
| onDelete={ deletePage ? handleDeleteNote : handleSoftDeleteNote} | |
| onDelete={deletePage ? handleDeleteNote : handleSoftDeleteNote} |
|
|
||
| export function NoteCard({ note, isActive, onClick, onDelete, onDuplicate }: NoteCardProps) { | ||
| const path = useLocation()?.pathname; | ||
| const deletePage = path === '/recycle-bin'; |
There was a problem hiding this comment.
Inconsistent indentation. Line 28 should align with line 27.
| const deletePage = path === '/recycle-bin'; | |
| const deletePage = path === '/recycle-bin'; |
| const path = useLocation()?.pathname | ||
| const deletePage = path === '/recycle-bin' |
There was a problem hiding this comment.
Missing semicolons at the end of these statements for consistency with the rest of the codebase.
| const path = useLocation()?.pathname | |
| const deletePage = path === '/recycle-bin' | |
| const path = useLocation()?.pathname; | |
| const deletePage = path === '/recycle-bin'; |
|
the functionalty is fine please resolve the merge conflicts it can be merged please retest the functionalty before pushing the PR |
|
Please resolve the conflicts |
I have successfully implemented the recycle bin feature. Now when a user deletes a note it will move to recycle bin and after deleting note from recycle bin the note will be permanently deleted.
Fixed #32