From 9c51e6c0a1499c7f54598778040070e489887c9b Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Thu, 6 Aug 2026 15:25:44 +0200 Subject: [PATCH] feat(navigation): move "New category" next to the Categories caption The full-width NcAppNavigationNew button sat above everything else in the sidebar and drew attention away from the note list, even though creating a category is a rare action compared to picking one. It is now an inline action on the "Categories" caption: NcActions renders a single inline action as one icon button, so it appears as a small folder-plus next to the heading, with the action text as its accessible name and tooltip. No separate overflow menu is rendered, because there are no other actions. Dropping a note on the caption row still starts a new category containing that note, which is what the old button offered. The row rather than the icon is the drop target: it is a much larger area to aim at than a single icon, and the caption gets its own drop highlight since it is not an .app-navigation-entry and cannot reuse the existing .drop-over rule. Both the click and the drop path now call CategoriesList.startNewCategory() directly instead of round-tripping through the notes:category:new event bus. The subscription stays in place so anything else can still trigger it. The action is hidden while the note list is in an error state, matching the old button's `v-show="!loading.notes && !error"`; CategoriesList takes a `disabled` prop for that, since the caption itself is still rendered. The accessible name is unchanged, so the Playwright helpers that locate the button by role and name keep working. Co-Authored-By: Claude Opus 5 (1M context) --- src/App.vue | 43 +----------------- src/components/CategoriesList.vue | 74 ++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 43 deletions(-) diff --git a/src/App.vue b/src/App.vue index a5bc04645..aaaaaaebe 100644 --- a/src/App.vue +++ b/src/App.vue @@ -8,18 +8,7 @@