Skip to content

Give every Settings pane a consistent top inset#371

Merged
FuJacob merged 1 commit into
mainfrom
fix/settings-pane-top-padding
May 28, 2026
Merged

Give every Settings pane a consistent top inset#371
FuJacob merged 1 commit into
mainfrom
fix/settings-pane-top-padding

Conversation

@FuJacob
Copy link
Copy Markdown
Owner

@FuJacob FuJacob commented May 28, 2026

Panes whose first Section has no header sat flush against the title bar. Adds a 12pt top padding to the Form inside SettingsPaneScaffold so every pane has the same breathing room.

Greptile Summary

Fixes a layout bug where Settings panes whose first Section had no header would render flush against the title bar by adding a uniform .padding(.top, 12) to the Form inside SettingsPaneScaffold.

  • The fix is applied unconditionally, so panes whose first section does carry a header now receive the system's built-in inset plus 12 pt — worth a visual check across all panes to confirm headed panes don't feel over-spaced.
  • When a callout banner is visible, the VStack has spacing: 0 and 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

Filename Overview
Cotabby/UI/Settings/Components/SettingsPaneScaffold.swift Adds .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]
Loading

Comments Outside Diff (1)

  1. Cotabby/UI/Settings/Components/SettingsPaneScaffold.swift, line 28-41 (link)

    P2 Tight gap between callout and form when callout is present

    When a callout is rendered, SettingsCalloutView receives .padding(.top, 16) but no bottom padding. The VStack has spacing: 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) of SettingsCalloutView, 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!

    Fix in Codex Fix in Claude Code

Fix All in Codex Fix All in Claude Code

Reviews (1): Last reviewed commit: "Give every Settings pane a consistent to..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@FuJacob FuJacob merged commit f86489f into main May 28, 2026
4 checks passed
@FuJacob FuJacob deleted the fix/settings-pane-top-padding branch May 28, 2026 10:51
// 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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 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!

Fix in Codex Fix in Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant