No description
- Swift 100%
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>
|
||
|---|---|---|
| docs | ||
| Notera | ||
| Notera.xcodeproj | ||
| NoteraTests | ||
| .gitignore | ||
| CLAUDE.md | ||
| project.yml | ||
| README.md | ||