Give every Settings pane a consistent top inset#371
Conversation
| // whose first section is header-less (General, About, Apps) would otherwise butt | ||
| // flush against the title bar. A fixed top inset gives every pane the same | ||
| // breathing room regardless of whether the first section carries a header. | ||
| .padding(.top, 12) |
There was a problem hiding this comment.
Extra top inset on panes whose first section already has a header
.formStyle(.grouped) on macOS inserts its own top gap before a section header. Applying an unconditional .padding(.top, 12) on top of that means header-bearing panes (e.g. any pane whose first Section has a non-empty title) now receive the original system inset plus 12 pt, while header-less panes receive only 12 pt. The goal of uniform breathing room is achieved for the broken case, but headed panes will now sit lower than before — which may be the intended trade-off, but it's worth verifying visually across all panes.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Panes whose first Section has no header sat flush against the title bar. Adds a 12pt top padding to the Form inside
SettingsPaneScaffoldso every pane has the same breathing room.Greptile Summary
Fixes a layout bug where Settings panes whose first
Sectionhad no header would render flush against the title bar by adding a uniform.padding(.top, 12)to theForminsideSettingsPaneScaffold.calloutbanner is visible, theVStackhasspacing: 0and the callout carries no explicit bottom padding, leaving only 12 pt between the banner's edge and the form — this may look tighter below the callout than above it.Confidence Score: 4/5
Safe to merge — the change is a single-line layout tweak with a clear, well-commented rationale.
The fix correctly addresses the flush-against-title-bar issue for header-less panes, but applying the inset unconditionally means headed panes gain extra top space they didn't have before. This is a cosmetic side-effect rather than a functional regression, but it warrants a visual pass across all settings panes before shipping.
SettingsPaneScaffold.swift — specifically the callout-plus-form layout path and any pane that uses a first section with a header.
Important Files Changed
.padding(.top, 12)to the Form inside SettingsPaneScaffold to fix flush-against-title-bar layout on header-less panes; the fix is unconditional so headed panes also gain extra top space, and the gap between a visible callout and the form is narrow (only the 12 pt inset, no explicit callout-to-form spacing).Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[SettingsPaneScaffold] --> B{callout present?} B -- Yes --> C[SettingsCalloutView\n.padding top:16, horizontal:20] B -- No --> D[skip callout] C --> E[VStack spacing:0] D --> E E --> F[Form with content\n.formStyle .grouped\n.padding top:12] F --> G{First Section has header?} G -- Yes --> H[system inset + 12 pt top gap] G -- No --> I[12 pt top gap only\nFIX: was 0]Comments Outside Diff (1)
Cotabby/UI/Settings/Components/SettingsPaneScaffold.swift, line 28-41 (link)When a callout is rendered,
SettingsCalloutViewreceives.padding(.top, 16)but no bottom padding. TheVStackhasspacing: 0, so the only gap between the callout's content edge and the form's first row is the 12 pt top inset added here. Depending on the internal.padding(12)ofSettingsCalloutView, this may produce a noticeably tighter visual gap below the callout compared to the space above it.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Reviews (1): Last reviewed commit: "Give every Settings pane a consistent to..." | Re-trigger Greptile