Skip to content

feat: per-user board ordering in the navigation#8150

Open
Lightshadow02 wants to merge 4 commits into
nextcloud:mainfrom
Lightshadow02:feat/user-board-order
Open

feat: per-user board ordering in the navigation#8150
Lightshadow02 wants to merge 4 commits into
nextcloud:mainfrom
Lightshadow02:feat/user-board-order

Conversation

@Lightshadow02

Copy link
Copy Markdown

Summary

The left navigation sorts boards alphabetically (hard-coded), which does not match how people prioritise their boards. This adds per-user manual ordering:

  • New per-user config key boardOrder (JSON array of board ids) through the existing ConfigService user-config plumbing and the existing OCS POST /config/{key} route — no schema migration, no shared state: each user has their own order and boards themselves are untouched
  • getAll() exposes boardOrder to the frontend initial state; value is validated (list of ints) and cleaned on write; documented in docs/API.md
  • Frontend: drag & drop of boards in the "All boards" navigation category only (archived/shared categories keep the alphabetical sort), sortBoards() helper — user order first, boards not in the list appended alphabetically (new/newly shared boards), stale ids ignored
  • Rename input and actions menu are non-drag areas; failures show an error toast and the order reverts
  • Jest tests for the helper; PHPUnit tests for the config round-trip and validation

How to test

  1. Drag boards into a custom order in the "All boards" section; F5 persists it
  2. A second user on the same boards keeps their own independent order
  3. New boards appear at the end of the list alphabetically

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

🤖 Generated with Claude Code

Lightshadow02 and others added 4 commits July 10, 2026 10:52
Signed-off-by: HUGO LOUREIRO <149155946+Lightshadow02@users.noreply.github.com>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: HUGO LOUREIRO <149155946+Lightshadow02@users.noreply.github.com>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- AppNavigationBoardCategory.vue: add non-drag-area-selector="input,
  .app-navigation-entry__actions" to the boards Container, mirroring
  the labels-Container fix. Verified against the installed
  @nextcloud/vue source that NcAppNavigationItem renders its actions
  slot inside an element with the app-navigation-entry__actions
  class, and that AppNavigationBoard's rename field (NcTextField ->
  NcInputField) renders a plain <input>, so board rename and the
  actions menu no longer start a drag.
- tests/unit/Service/ConfigServiceTest.php: replace the copy-pasted
  2016 Julius Härtl header with the current SPDX header, matching
  the style already used by other 2026 test files in this app (e.g.
  tests/unit/Event/WebhookCompatibleEventsTest.php).
- docs/API.md: document the boardOrder config key in the Config
  section's key table.

Signed-off-by: HUGO LOUREIRO <149155946+Lightshadow02@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: HUGO LOUREIRO <149155946+Lightshadow02@users.noreply.github.com>

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant