Skip to content

Feature request: Sort sidebar folders alphabetically #1909

@gjouret

Description

@gjouret

Problem

There is no way to sort sidebar folders alphabetically. The sidebar order is controlled exclusively by a priority integer in ProjectSettings (stored in NSUbiquitousKeyValueStore), which is only modifiable via drag-and-drop.

When folders are reorganized (renamed, merged, or newly created), the priority values become inconsistent — old folders retain their previous drag-and-drop positions while new folders default to priority 0. This results in a jumbled sidebar order with no way to fix it other than manually dragging every folder into place.

Current behavior (from source code)

Storage.getSidebarProjects() (Storage.swift:256-260) sorts by name first, then overrides with priority:

public func getSidebarProjects() -> [Project] {
    return projects
        .filter({ $0.isBookmark || $0.parent?.isDefault == true })
        .sorted(by: { $0.label.lowercased() < $1.label.lowercased() })
        .sorted(by: { $0.settings.priority < $1.settings.priority })
}

The per-folder "sort" setting in Project Settings only controls note sorting within a folder — it has no effect on folder order in the sidebar.

Requested behavior

Add a sidebar context menu option or preference to sort folders alphabetically by name, which would reset all ProjectSettings.priority values to 0 (letting the existing alphabetical tiebreaker take effect).

Alternatively, add a toggle between "Manual order" and "Alphabetical order" for the sidebar.

Environment

  • FSNotes 7.1.1
  • macOS 15 Sequoia

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions