feat(core): allow pinning apps inline in the navigation bar#61825
feat(core): allow pinning apps inline in the navigation bar#61825MiMoHo wants to merge 2 commits into
Conversation
Bring back one-click app switching next to the app menu launcher: users can pin selected apps in the personal 'Navigation bar settings' section. Pinned entries render inline in the top bar following the user-defined app order, everything else stays in the app menu popover. - The inline entries reuse the pre-NC34 AppMenuEntry/AppMenuIcon components, restored from stable33 (icon, label on hover/focus, active indicator, unread dot), adjusted to the 44px header. - The list is measured (useElementSize) and only renders as many entries as fit, so it can never collide with the centered search. - The current-app trigger is hidden while the active app is visible in the pinned list, as the active entry already shows the location. - Pinned entries are stored as user preference core/apps_pinned and saved through the same provisioning API path as apporder, validated in the theming BeforePreferenceListener. - Pin toggles live in the existing personal 'Navigation bar settings' section next to the app order controls. Resolves nextcloud#61274 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: MiMoHo <37556964+MiMoHo@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: MiMoHo <37556964+MiMoHo@users.noreply.github.com>
|
Nice improvement ! For the questions asked :
|
I'd suggest that to support people migrating from older versions of Nextcloud and used to the Nextcloud interface, the default apps included in most/all installations should be pinned by default (calendar, files, photos, mail, contacts, etc). Or perhaps pin them by default when migrating from a previous install, but not when doing a new install. Dunno. I'd also like to see an option to get rid of the new search bar and make it an icon again to make more space for app icons for the people who rarely/never use the unified search. I am far more likely to use an app-specific search. Great work and thank you for taking on board the community feedback. |
|
I am all for options, so I'd summarize:
Basically - give people customisation options. Menu bar is like system tray for the OS, waffle menu is like "Start" menu of the OS. They are very personal, and many different people use this product, so give options to customise such very important parts of UI. I am still not on NC 34 and I am also using Custom menu mentioned above, and would prefer this being part of the core Nextcloud experience, preferably not waiting for NC 35 (link to app.for those that don't know about it : https://apps.nextcloud.com/apps/side_menu ) |

Summary
Implements #61274: users can pin selected apps to show them inline in the top bar for one-click switching, while everything else stays in the app menu popover. The default stays exactly as it is today — nothing changes unless a user pins apps.
How it works
AppMenuEntry/AppMenuIconcomponents, restored fromstable33(icon, label on hover/focus, active indicator, unread dot) and adjusted to the 44px header (--header-height-based sizing, active indicator at 4px).flex: 1 1; width: 0) and is measured withuseElementSize; it only renders as many entries as fit, so it can never push the centered search around (same approachstable33used for overflow). Below 1024px the list is hidden, same breakpoint as the current-app button — the popover covers app switching there.core/apps_pinned(JSON list of navigation entry ids), saved through the same provisioning API route asapporderand validated in the themingBeforePreferenceListener. Order of the pinned entries follows the existing user-sortable app order.AppOrderSelectorrows (opt-in viashowPinprop, so the admin "default apps" usage is unchanged).Testing
core/src/tests/components/AppMenu.spec.ts: 7 new cases (inline rendering follows nav order, unknown ids ignored, no list when nothing is pinned, width-capped rendering, current-app hiding/keeping incl. the truncated-away case) — 15/15 pass.Open questions for design review 🙏
Opening as draft to align on the design first (feedback from the #61274 / #59888 crowd very welcome):
defaultPinnedAppsin theming)?--app-menu-entry-growthfrom the NC33 entry was kept, but at 44px header height long labels still ellipsize on hover — acceptable, or should the hover-label mechanic be simplified (e.g. plain tooltip)?Resolves #61274
🤖 Generated with Claude Code