Skip to content

fix: give the Bar page's preview room and narrow its tabs - #403

Merged
M4n0x merged 1 commit into
mainfrom
fix/402-bar-page-spacing
Nov 1, 2026
Merged

M4n0x merged 1 commit into
mainfrom
fix/402-bar-page-spacing

Conversation

@M4n0x

@M4n0x M4n0x commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator

Problem

In Settings → Bar, the bar preview ends 10 pt above the widget list and inspector, so the page feels cramped, and the inspector's tabs stretch across its whole width, about 250 pt per tab in a 1280 pt window.

Fixes #402

Changes

  • Header band: the screen picker and the preview sit on a darker band (new SettingsPalette.stage), with 16 pt of it below the preview before the divider. They read as the page's header, and the settings start after it.
  • Tabs: Content / Style / Behavior and Size / Look / Placement are capped at 330 pt, centered, with equal widths, like macOS tabs that switch pages.

Testing

  • swift build, and swift test --filter "FixedDateTests|SceneRendererTests|SceneFileTests": 35 tests passed.
  • Drew the settings-bar scene from an app bundle, so the preview has its wallpaper, at 1280 pt in dark and light. The repo's five scenes still draw.
  • Compared other spacings and tab layouts on renders first: more space alone (24 pt) didn't separate the preview from the settings, and tabs sized to their labels looked off under the header.
  • Not checked in the running app: no second bar was launched.
Before After
Dark Bar page before, dark Bar page after, dark
Light Bar page before, light Bar page after, light

Merging

One commit: any merge method works.

Claude Opus 5.5 via Claude Code

The screen picker and the bar preview now sit on a darker band, with 16 pt
of it below the preview, so they read as the page's header and the settings
start after it. The inspector's tabs are capped at 330 pt, centered, with
equal widths, instead of stretching across the whole inspector.

Fixes #402
@M4n0x
M4n0x requested a review from Seb-GRAF as a code owner November 1, 2026 12:53
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between cf80635 and 37a222e.

Files selected for processing: 3
  • Sources/StableBar/BarInspector.swift
  • Sources/StableBar/SettingsComponents.swift
  • Sources/StableBar/WidgetsView.swift

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The Bar settings layout now separates the screen band and preview from the settings with a stage background and spacing. The widget and bar tab selectors have a maximum width of 330 points.

Changes: Bar settings layout

Layer / File(s) Summary
Preview stage spacing
Sources/StableBar/SettingsComponents.swift, Sources/StableBar/WidgetsView.swift
The stage palette adds light and dark colors. The screen band and preview now sit in a padded vertical stack on the stage background. The sidebar and inspector row no longer has top padding.
Inspector tab width
Sources/StableBar/BarInspector.swift
The widget and bar tab selectors now have a maximum width of 330 points. Existing padding remains.

Severity of issue fixed: Low

Merge Risk: Minimal · up to 37a22

No concrete correctness, availability, or usability issue was found in the layout changes.

Pre-merge checks: Passed 3
Check name Status Explanation
Description check Passed The pull request description includes all required sections: Problem, Changes, Testing, and Merging. It explains the issue, summarizes the implementation, records build and test results, notes the run…
Linked Issues check Passed Issue #402 asks for two layout changes in Settings → Bar. (1) The screen picker and preview must read as a page header, with room before the settings. (2) The Content / Style / Behavior and Size / Loo…
Out of Scope Changes check Passed The whole-PR diff (cf80635 to 37a222e) changes three files: WidgetsView.swift, BarInspector.swift, and SettingsComponents.swift. All three belong to the Settings → Bar page that issue #402 names. Widg…
Full details: Description check

Explanation

The pull request description includes all required sections: Problem, Changes, Testing, and Merging. It explains the issue, summarizes the implementation, records build and test results, notes the running-app limitation, includes visual comparisons, and ends with the required agent attribution.

Full details: Linked Issues check

Explanation

Issue #402 asks for two layout changes in Settings → Bar. (1) The screen picker and preview must read as a page header, with room before the settings. (2) The Content / Style / Behavior and Size / Look / Placement tabs must not stretch across the inspector. The head revision implements both, as the issue diagnosis proposes.

Header band: In Sources/StableBar/WidgetsView.swift, ScreenBand and BarPreview now sit in one VStack. It has .padding(.vertical, 12) on the band, .padding(.horizontal, 16), .padding(.bottom, 16), and .background(SettingsPalette.stage). The old .padding(.top, 10) on the list/inspector HStack is removed. SettingsPalette.stage is added in Sources/StableBar/SettingsComponents.swift (light 0xe6e6eaff, dark 0x161618ff), which is darker than the page background. This matches the issue's darker band with 16 pt below the preview.

Tabs: In Sources/StableBar/BarInspector.swift, both SettingsSegments strips (widget tabs and bar tabs) now carry .frame(maxWidth: 330). The outer VStack centers them. The tabs keep the default stretches: true, so they divide the 330 pt width equally. This matches the issue's cap at 330 pt, centered, with equal widths.

Automated tests: The issue sets no automated test requirement. Its expected behavior is visual. The PR reports visual renders in dark and light, which the head code does not show. This does not affect the verdict, because the code changes implement the stated layout.

Limits: The BarInspector.swift diff was unavailable. I read the head blob directly. Its content matches the PR summary. I did not read SettingsSegments internals, so equal-width behavior under the 330 pt frame rests on the stretches: true default and the author's renders.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff (cf80635 to 37a222e) changes three files: WidgetsView.swift, BarInspector.swift, and SettingsComponents.swift. All three belong to the Settings → Bar page that issue #402 names. WidgetsView.swift changes only the spacing and background of the header band and the removal of the list's top padding. BarInspector.swift adds two .frame(maxWidth: 330) modifiers to the existing tab strips. SettingsComponents.swift adds one palette color, SettingsPalette.stage, which WidgetsView.swift uses. No unrelated files, refactors, or behavior changes appear in the summary or in the reviewed diffs. The PR adds no new tests, and none are required for this layout issue.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Before and after

main at cf80635 → this pull request at 37a222e · 26 screens drawn in one CI job · 6 changed

Screen Change Where (image pixels)
docs/essentials-clock-settings-dark 1,338,467 pixels 0,106 · 2160×1336
docs/essentials-clock-settings-light 1,333,736 pixels 0,106 · 2160×1336
docs/essentials-settings-dark 1,299,659 pixels 0,106 · 2160×1319
docs/essentials-settings-light 1,278,545 pixels 0,106 · 2160×1319
scenes/settings-bar-dark 1,192,314 pixels 0,106 · 2160×1188
scenes/settings-bar-light 1,162,858 pixels 0,106 · 2160×1188

docs/essentials-clock-settings-dark

Before After
Before After

Difference, changed pixels in red:

Difference

docs/essentials-clock-settings-light

Before After
Before After

Difference, changed pixels in red:

Difference

docs/essentials-settings-dark

Before After
Before After

Difference, changed pixels in red:

Difference

docs/essentials-settings-light

Before After
Before After

Difference, changed pixels in red:

Difference

scenes/settings-bar-dark

Before After
Before After

Difference, changed pixels in red:

Difference

scenes/settings-bar-light

Before After
Before After

Difference, changed pixels in red:

Difference

20 unchanged screens

docs/essentials-dark, docs/essentials-light, docs/hero-dark, docs/hero-light, docs/popups-dark, docs/popups-light, docs/settings-dark, docs/settings-light, docs/themes-dark, docs/themes-light, scenes/essentials-clock-popup-dark, scenes/essentials-clock-popup-light, scenes/settings-general-dark, scenes/settings-general-light, scenes/settings-theme-dark, scenes/settings-theme-light, scenes/starter-bar-dark, scenes/starter-bar-light, scenes/starter-edit-bar-dark, scenes/starter-edit-bar-light

Visual review: 6 changed screens approved.

@M4n0x M4n0x added the visual-ok A maintainer looked at the changed screens and approves them label Nov 1, 2026
@M4n0x
M4n0x merged commit d0579b8 into main Nov 1, 2026
16 checks passed
@M4n0x
M4n0x deleted the fix/402-bar-page-spacing branch November 1, 2026 13:12
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.10.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

released visual-ok A maintainer looked at the changed screens and approves them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The Bar page's preview sits right on top of the settings, and its tabs stretch across the whole inspector

1 participant