No description
Find a file
Trevor Lyall a439fc0020 fix(sheets): replace leaking Catalyst toolbar Cancel with in-content SheetHeader
On Mac Catalyst, a sheet presented from a SwiftUI NavigationStack renders
its .toolbar { ToolbarItem(.cancellationAction) } button as a tiny floating
pill in the top-left that clips long labels — "Cancel" and "Choose Template"
showed up as "C..." and floated awkwardly above the sheet content.
Separately, a sheet's .navigationTitle bleeds into the parent macOS window's
title bar via the Catalyst bridge and can stick there after the sheet is
dismissed.

Introduce a shared SheetHeader component that puts a bold title on the left
and a hierarchical X close button on the right directly in the sheet's
content. The close button supports Escape as a keyboard shortcut. An
optional trailing ViewBuilder slot lets callers add extra controls (used by
TagPickerView for its + button) without reintroducing the broken toolbar
pattern.

Applied to all six sheets that had the issue:
- TemplatePickerView (Choose Template)
- SectionTypePicker (Insert Section)
- ImageSourceMenu (Insert Image)
- TagPickerView (Tags — retains + button via trailing slot)
- ExportOptionsView (Export)
- SearchView (Search — rebuilt with a native TextField search input since
  .searchable requires a nav bar we've deliberately hidden)

Each sheet drops its NavigationStack where it wasn't load-bearing; SearchView
keeps its NavigationStack for navigationDestination but hides the nav bar
with .toolbar(.hidden, for: .navigationBar).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-08 14:17:24 +02:00
docs docs: align project docs with shipped reality and KMP cross-platform direction 2026-04-08 09:55:38 +02:00
Notera fix(sheets): replace leaking Catalyst toolbar Cancel with in-content SheetHeader 2026-04-08 14:17:24 +02:00
Notera.xcodeproj fix(sheets): replace leaking Catalyst toolbar Cancel with in-content SheetHeader 2026-04-08 14:17:24 +02:00
NoteraTests refactor(vault): slim frontmatter, hide task markers as %% comments, add section delimiters 2026-04-08 14:16:40 +02:00
.gitignore chore: add .worktrees/ to gitignore for isolated workspaces 2026-03-17 14:38:50 +01:00
CLAUDE.md docs: align project docs with shipped reality and KMP cross-platform direction 2026-04-08 09:55:38 +02:00
project.yml build: restore GRDB + Mac Catalyst + signing config to project.yml 2026-04-08 10:00:53 +02:00
README.md Initial commit 2021-10-23 08:53:57 +02:00

notera