Skip to content

feat(core): allow pinning apps inline in the navigation bar#61825

Draft
MiMoHo wants to merge 2 commits into
nextcloud:masterfrom
MiMoHo:feat/61274/pinned-navigation-apps
Draft

feat(core): allow pinning apps inline in the navigation bar#61825
MiMoHo wants to merge 2 commits into
nextcloud:masterfrom
MiMoHo:feat/61274/pinned-navigation-apps

Conversation

@MiMoHo

@MiMoHo MiMoHo commented Jul 4, 2026

Copy link
Copy Markdown

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.

State Screenshot
Two pinned apps, active app (Files) shows the indicator, current-app trigger hidden header with pinned apps
Labels on hover/focus, like the pre-NC34 navigation header on hover
Pin toggles in the existing personal "Navigation bar settings" settings section

How it works

  • Pinned entries reuse the pre-NC34 AppMenuEntry/AppMenuIcon components, restored from stable33 (icon, label on hover/focus, active indicator, unread dot) and adjusted to the 44px header (--header-height-based sizing, active indicator at 4px).
  • The inline list claims the free space between the menu triggers and the centered search (flex: 1 1; width: 0) and is measured with useElementSize; it only renders as many entries as fit, so it can never push the centered search around (same approach stable33 used for overflow). Below 1024px the list is hidden, same breakpoint as the current-app button — the popover covers app switching there.
  • The current-app trigger is hidden while the active app is visible in the pinned list (the active entry already shows the location); it stays for settings pages and unpinned apps.
  • Storage: user preference core/apps_pinned (JSON list of navigation entry ids), saved through the same provisioning API route as apporder and validated in the theming BeforePreferenceListener. Order of the pinned entries follows the existing user-sortable app order.
  • Pin toggles are added to the existing AppOrderSelector rows (opt-in via showPin prop, 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.
  • Verified manually against a local instance: pin/unpin round-trip through the settings UI (OCS 200, reload hint shown, header updates after reload), active indicator, hover labels, settings pages keep the "Settings" trigger.

Open questions for design review 🙏

Opening as draft to align on the design first (feedback from the #61274 / #59888 crowd very welcome):

  1. Is per-user pinning in personal settings the right scope, or should there also be an admin-set instance default (e.g. defaultPinnedApps in theming)?
  2. --app-menu-entry-growth from 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)?
  3. Should the current-app trigger stay visible even when the active app is pinned (i.e. never hide it)?
  4. Cap on the number of pinned apps? Currently the width measurement is the only limit (extra pins simply don't render).

Resolves #61274

🤖 Generated with Claude Code

MiMoHo and others added 2 commits July 5, 2026 01:25
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>
@sedric

sedric commented Jul 5, 2026

Copy link
Copy Markdown

Nice improvement !

For the questions asked :

  1. Maybe a bit of both ? Like admin set the default, while allowing per-user setting ?
  2. I think it's acceptable, it was is the past and never was that big of an issue
  3. No pref
  4. Cap is not future-proof design. If it's hidden, we can still get it from the waffle menu

@mwerle

mwerle commented Jul 5, 2026

Copy link
Copy Markdown
  1. Admin-enforced pinning: no. Admin-defaulted pinning: yes. Basically allow users to adjust their workspace, but give admins a way to "advertise" newly installed apps or apps which are expected to be commonly used in a particular environment.
  2. no opinion
  3. no opinion
  4. If some app icons are hidden, this should be indicated in some way ("...", "»" ?). If all app icons remain in the drop-down "waffle" menu regardless of whether they are pinned or not, they can still be accessed. But a big no to an enforced limit. People with bigger displays would be artificially restricted.

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.

@joskapista44

joskapista44 commented Jul 5, 2026

Copy link
Copy Markdown

Thank you for your work,

  • I think if you have less apps, labels on hover/focus is not necessary. Please add the option to turn it on/off
  • Please also add the same options for the waffle menu: ability to unpin something or everything from the waffle menu. If you unpin all from there, you also hide waffle menu with it (no point to keep an empty menu)

1: It would be nice as you mentioned: Default settings in the admin interface, with the option (on/off) for regular users to modify them.
2: I think the tooltip is a good idea, the old way wasn't a clean design
3: yes - But if you make an option also on the waffle menu as I mentioned before with the ability of unpin items from the waffle, you give the more options to the users to customize their nextcloud for almost free
4: NC33 + Custom menu behavior was perfect: as you resize the window, if the icons don't all fit, three dots appear, which let you access the ones that didn't fit on the screen.
614401859-33ed5656-41ee-4277-8e48-9a6b63cf7efc

@luxzg

luxzg commented Jul 5, 2026

Copy link
Copy Markdown

I am all for options, so I'd summarize:

  • admin having ability to pre-pin / default the pins, or indeed set the defaults for all settings
  • user being able to override any of it
  • ability to set labels to hover/permanent/no-labels
  • ability to set search to search field/just icon/no search
  • ability to pin any apps and as many apps as possible (overflow being indicated by ellipsis depending on screen size/resolution, dynamically)

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 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Option to use Waffle menu or links displayed normally

5 participants