Skip to content

GMSnagNav 0.2.0

Choose a tag to compare

@kerker00 kerker00 released this 04 Oct 13:58
· 22 commits to main since this release
5baa3e9

Sidebars that feel at home on macOS: sections, renaming in place, type select, copying by
dragging with the Option key, and empty states. Everything is opt-in; existing outlines behave as
before.

Added

  • OutlineDropProposal.isCopyRequested, set on macOS while the user holds the Option key during a
    drag. Accept such drops with .copy to copy elements as in the Finder; the default validation
    still moves.
  • outlineEmptyContent(_:) to show content such as a ContentUnavailableView while the outline
    has no elements. It lets clicks and drops through, so dropping onto the root level and the
    context menu for empty space keep working.
  • outlineTypeSelect(_:) to select a row by typing the start of its text on macOS, as in the
    Finder. Rows that cannot be selected are skipped.
  • outlineSections(_:) to show top-level elements as section headers, like "Favorites" in the
    Finder's sidebar: group rows on macOS and bold headings on iOS, never selected, collapsible
    through the expansion binding, and draggable when outlineDraggable(_:) allows it.
  • outlineRenaming(_:canRename:onRename:) to rename elements in a text field within their row,
    started through a binding and, on macOS, with Return as in the Finder: while it is on, Return
    renames a single selected row instead of running the primary action, which stays on
    double-click. OutlineLabel and section headers turn into the text field by themselves;
    OutlineRenamableText does the same in custom rows.