Repository navigation
feat(zoom-controls): default to horizontal orientation - #14
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
The diff is a minimal, self-consistent default change with rendering logic that correctly handles both orientation values and an accurate CHANGELOG entry, leaving no outstanding issues.
No open issues 🎉
What changed in this PR
This PR changes the ZoomControls primitive in @behindthemusictree/ui so that orientation defaults to "horizontal" instead of "vertical". Since every current consumer already passes orientation="horizontal", the old vertical default only forced them to set the prop explicitly. The prop itself is retained, so orientation="vertical" still produces the column layout. This is a small, backward-compatible-at-the-API-level step toward simplifying the controls in genre-tree-view.
Changes:
- Default
orientationforZoomControlsis now"horizontal"(prop kept, so"vertical"still works). - Added a
### Changedentry under[Unreleased]inCHANGELOG.mddocumenting the new default and how to restore the column layout.
| File | Description |
|---|---|
packages/ui/src/ZoomControls.tsx |
Flips the default value of the orientation prop from "vertical" to "horizontal"; rendering logic already supports both. |
CHANGELOG.md |
Documents the default-orientation behavior change under [Unreleased] > Changed. |
Review effort: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ZoomControlsnow defaults toorientation="horizontal". Every consumer already uses the horizontal layout (app-kit-ui, grow'sGenealogyChart), so the vertical default only forced them to pass the prop. This is the first step of making the controls single-orientation in genre-tree-view.Changes
ZoomControls.tsx: defaultorientationis"horizontal"; the prop is kept, soorientation="vertical"still works and explicit"horizontal"callers are unaffected.CHANGELOG.md[Unreleased]: Changed entry. Behavior change for callers relying on the old default, so the release is a minor (0.11.0).Test plan
pnpm buildpnpm lint(tsc --noEmit)pnpm testprints "no tests yet"), so the default is not covered by a test.🤖 Generated with Claude Code