Skip to content

feat(ui): Add rename/delete category actions in the sidebar#1732

Open
aronovgj wants to merge 1 commit intonextcloud:mainfrom
aronovgj:feature/renameDelete
Open

feat(ui): Add rename/delete category actions in the sidebar#1732
aronovgj wants to merge 1 commit intonextcloud:mainfrom
aronovgj:feature/renameDelete

Conversation

@aronovgj
Copy link
Contributor

@aronovgj aronovgj commented Jan 28, 2026

This introduces a per‑category actions menu (three‑dot button) in the left navigation.

Features:

  • Added per‑category action menu (three dots) in the sidebar.
  • Categories can be renamed inline directly from the menu.
  • Categories can be deleted from the menu.
  • Deleting a category with notes asks for confirmation.
  • Deleting a category removes all notes in that category.
  • New categories can be created inline (focused rename field immediately).
  • Dragging a note onto “New category” creates a category and moves the note there.

Closes #1397
Closes #1120
Probably closes #1669
https://github.com/aronovgj/notes/blob/98e04a03435a384c557e6004a6c9c1cae6a672e4/src/components/NoteItem.vue#L299

This is how it would look:

image

@JuliaKirschenheuter
Copy link
Contributor

@marcoambrosini In my opinion it does make sense and makes usibility easier around using notes app. What would you say?

@aronovgj aronovgj force-pushed the feature/renameDelete branch 2 times, most recently from 98e04a0 to 63014ec Compare January 31, 2026 14:12
@aronovgj
Copy link
Contributor Author

aronovgj commented Feb 3, 2026

Ping @marcoambrosini

Copy link

@benjaminfrueh benjaminfrueh left a comment

Choose a reason for hiding this comment

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

Hi @aronovgj and thank you for your contribution!

A few recommendations from my side regarding this implementation.

Categories in notes are simply directories in Nextclouds file storage under the notes root directory. This means renaming a category is basically just renaming a directory, and deleting a category is just deleting a directory, one operation via the OCP\Files API. The oc_notes_meta rows are cleaned on the next sync.

What this current implementation does is loop through every note on the client-side and send one HTTP request per note to move or delete each file individually, which for large categories means a high amount of sequential requests. Beyond performance, this is also not atomic as if the network drops or the browser is closed mid-loop, you end up with partially renamed or partially deleted data.

To fix this properly, we should add two new backend endpoints to the NotesApiController, a PATCH for renaming a category and a DELETE for deleting one and implement the logic for it in NotesService calling OCP\Files move() and delete().

Once those endpoints exist, the frontend simplifies to a single request per operation, and UI state should only be updated after a confirmed successful response.

One smaller thing: getDraggedNoteId is duplicated, maybe they could be extracted into a shared utility function.

@aronovgj aronovgj force-pushed the feature/renameDelete branch 2 times, most recently from 10ec59c to 4e10d57 Compare March 5, 2026 18:11
@aronovgj aronovgj force-pushed the feature/renameDelete branch from 4e10d57 to e14a959 Compare March 5, 2026 18:21
@aronovgj aronovgj requested a review from benjaminfrueh March 5, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reload error when deleting notes Enable renaming of categories Do not remove the category/folder when the last note was removed

3 participants