feat(bread-theme): vertical (side-docked) bar orientation (v0.7.10) #18

Closed
Breadway wants to merge 0 commits from feature/bar-15-vertical-side-dock into main
Owner

Summary

Part of BAR-15 (breadbar): support a bar docked to the left/right screen edge, not just top/bottom.

[bar.window].anchors already accepted left/right as edge pins for a horizontal bar, but there was no orientation axis at all — width (Fill/Px) was always the length axis and height was always the fixed thickness, with no "fill vertically, fixed width" mode.

Approach

Derived from the anchor set instead of a new schema field: anchored to exactly one of left/right and both top and bottom is unambiguously a vertical dock — the same "opposing anchors with nothing else fill that axis" rule a horizontal bar already uses for width = "fill", applied to the other axis. Every existing theme's anchor set (e.g. ["top", "left", "right"]) resolves to Horizontal unchanged — no migration, no new TOML key.

Changes

  • bread-theme/src/shell/types.rs: WindowOrientation enum + WindowSpec::orientation().
  • bread-theme/src/shell/manifest.rs: resolve_window rejects width = "fill" on a vertical anchor set — the fill axis for a side dock is top/bottom (already filled by the anchors), so "fill" has nothing left to mean on width.
  • docs/shell-themes.md: new "Side-docked (vertical) bars" subsection, updated live-vs-restart table and the needs_restart exact-rule paragraph (see companion breadbar PR — a horizontal↔vertical switch is one of the few [bar.window] changes that isn't live, since the internal box orientations aren't rebuilt by the live-reload path).
  • Version bump to 0.7.10 + CHANGELOG entry.

Test plan

  • cargo build --release -p bread-theme
  • cargo test --release -p bread-theme — 109 tests passing, including 6 new WindowSpec::orientation() unit tests (types.rs) and 2 new manifest-resolution tests (mod.rs: a left-docked theme resolves as Vertical with width intact; width = "fill" on a vertical anchor set is a hard error naming "vertical")

Depends on / blocks

Breadbar's consumer-side changes (apply_window_spec's exclusive zone, and vertical-stacking layout for the bar's slot containers) are written and tested locally against this branch via a .cargo/config.toml path patch, but can't be opened as a real PR or merged until this lands and a new tag is cut — breadbar pins bread-theme by git tag (v0.7.9 currently), and the new WindowOrientation/orientation() API doesn't exist there yet. Sequencing: merge this → cut a v0.7.10 tag → bump breadbar's pin → open breadbar's PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WtbAi2H268yYaoUb5YoPN9

## Summary Part of BAR-15 (breadbar): support a bar docked to the left/right screen edge, not just top/bottom. `[bar.window].anchors` already accepted `left`/`right` as edge pins for a horizontal bar, but there was no orientation axis at all — `width` (`Fill`/`Px`) was always the length axis and `height` was always the fixed thickness, with no "fill vertically, fixed width" mode. ## Approach Derived from the anchor set instead of a new schema field: anchored to exactly one of `left`/`right` **and** both `top` and `bottom` is unambiguously a vertical dock — the same "opposing anchors with nothing else fill that axis" rule a horizontal bar already uses for `width = "fill"`, applied to the other axis. Every existing theme's anchor set (e.g. `["top", "left", "right"]`) resolves to `Horizontal` unchanged — no migration, no new TOML key. ## Changes - `bread-theme/src/shell/types.rs`: `WindowOrientation` enum + `WindowSpec::orientation()`. - `bread-theme/src/shell/manifest.rs`: `resolve_window` rejects `width = "fill"` on a vertical anchor set — the fill axis for a side dock is top/bottom (already filled by the anchors), so `"fill"` has nothing left to mean on `width`. - `docs/shell-themes.md`: new "Side-docked (vertical) bars" subsection, updated live-vs-restart table and the `needs_restart` exact-rule paragraph (see companion breadbar PR — a horizontal↔vertical switch is one of the few `[bar.window]` changes that isn't live, since the internal box orientations aren't rebuilt by the live-reload path). - Version bump to 0.7.10 + CHANGELOG entry. ## Test plan - [x] `cargo build --release -p bread-theme` - [x] `cargo test --release -p bread-theme` — 109 tests passing, including 6 new `WindowSpec::orientation()` unit tests (types.rs) and 2 new manifest-resolution tests (mod.rs: a left-docked theme resolves as `Vertical` with `width` intact; `width = "fill"` on a vertical anchor set is a hard error naming "vertical") ## Depends on / blocks Breadbar's consumer-side changes (`apply_window_spec`'s exclusive zone, and vertical-stacking layout for the bar's slot containers) are written and tested locally against this branch via a `.cargo/config.toml` path patch, but **can't be opened as a real PR or merged until this lands and a new tag is cut** — breadbar pins `bread-theme` by git tag (`v0.7.9` currently), and the new `WindowOrientation`/`orientation()` API doesn't exist there yet. Sequencing: merge this → cut a `v0.7.10` tag → bump breadbar's pin → open breadbar's PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WtbAi2H268yYaoUb5YoPN9
Extends BAR-15 (breadbar): support a bar docked to the left/right
screen edge instead of only top/bottom. `[bar.window].anchors`
already accepts left/right as edge pins for a horizontal bar; this
adds the missing axis by deriving orientation from the anchor set
itself rather than a new schema field — anchored to exactly one of
left/right with both top and bottom filling is unambiguously a
vertical dock, and every existing theme's anchor set (e.g.
["top", "left", "right"]) resolves to Horizontal unchanged.

- WindowOrientation + WindowSpec::orientation() (types.rs).
- resolve_window rejects width = "fill" on a vertical anchor set:
  the fill axis for a side dock is top/bottom (already filled by the
  anchors), so "fill" has nothing left to mean on width.

Consumer-side work (breadbar's apply_window_spec, exclusive zone,
and vertical slot-stacking layout) is a separate, following commit.
Bump workspace version and add the CHANGELOG entry for the previous
commit's WindowSpec::orientation() work, and document side-docked
bars in docs/shell-themes.md ([bar.window] section, the live-vs-
restart table, and the exact needs_restart rule).
Breadway closed this pull request 2026-09-05 09:43:41 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bread-ecosystem!18
No description provided.