priyasirohi09 / joplin

Other
2 stars 91 forks source link

Add Rename Note Feature #260

Open Arnavya opened 3 months ago

Arnavya commented 3 months ago

This pull request introduces a new feature that allows users to rename their notes in Joplin. The changes include updates to the context menu, the note editor, and the note list to support this functionality.

*Changes Made

1)Context Menu File: src/commands/contextMenu.ts Added a "Rename Note" option to the right-click context menu for notes. Implemented a function to prompt the user for a new note title and update the note accordingly.

2)Note Editor File: src/components/noteEditor.tsx Added a "Rename" button next to the note title in the note editor. Implemented a function to handle renaming the note when the button is clicked.

3)Note List File: src/components/noteList.tsx Added functionality to update the note title in the note list when it is renamed.

4)Backend Logic (Optional) File: src/backend/noteService.ts Provided an example implementation of backend logic to handle renaming a note. Implementation Details Context Menu Update: A new menu item is added to the context menu to trigger the rename prompt. Note Editor Update: A rename button is introduced next to the note title, which prompts the user for a new title and updates the note. Note List Update: The note list component is updated to reflect the new title when a note is renamed. Testing Ensure to test the following scenarios: Right-clicking on a note and selecting "Rename Note" updates the note title correctly. Clicking the rename button next to the note title in the note editor updates the note title. The note title in the note list updates correctly after renaming a note.