Repository navigation
fix: center non-overflowing rails - #1
Merged
Merged
Conversation
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.
initialPosition="center"only set a scroll offset. When all items fit, the scroll range was zero and the group stayed start-aligned. This patch centers fitting groups with safe flex alignment while retaining midpoint scrolling for overflowing content. It uses the captured initial value, preserves consumer style precedence and direct children, and adds no runtime dependencies.Resize regression coverage also exposed browser-driven offset clamping being mistaken for user movement before ResizeObserver delivery. The initial-position controller now recognizes that clamp; pointer/wheel/keyboard intent and imperative scrolling still end automatic positioning.
The existing playground gains a Photos selector (1–6). Choose 2 with Start at: Middle, then resize to compare fitting and overflowing content. README, architecture/validation notes, changelog, and package/lock versions are updated for 0.1.1.
Validation:
npm ci,npm run check: passed; 51 unit/SSR tests, strict TypeScript, lint, formatting, package budgets and export checks.npm run test:e2e: 96 passed, 4 intentional CDP-only skips across all five browser profiles, including current WebKit 26.6.npm run build:demo(root and Pages base),npm run build:next,npm run test:next,npm run test:package: passed. React 18/19 tarball imports, CSS, and SSR passed.npm pack --dry-runand actual pack inspected: 12 intended files, about 21.8 KB compressed; no examples/tests/reference assets. JS grows by 41 gzip bytes; CSS unchanged.Release through the existing manually triggered
publish.ymlagainstv0.1.1after CI and merge. If npm trusted publishing is unavailable, keep the tag prepared and report the authentication blocker; do not add repository credentials.