Skip to content

docs(ranui): clarify layout alignment and boundary hierarchy - #434

Merged
chaxus merged 5 commits into
mainfrom
codex/layout-contract
Oct 21, 2026
Merged

chaxus merged 5 commits into
mainfrom
codex/layout-contract

Conversation

@chaxus

@chaxus chaxus commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Merge Verdict

[APPROVE] — The change defines and exercises composition acceptance without changing component behavior or foundation values.

Summary

An aligned button rectangle can hide an inset label, while a flexible title trigger can make unused toolbar space clickable. Extend the layout standard to distinguish frame, content, text, icon viewport and hit-area geometry, declare alignment spines and navigation columns, and require browser evidence for the layer that actually drifts.

Update the canonical guidance, interface/workflow entry points and English/Chinese consumer guides. Add a runnable browser example that rejects text-only drift, expanded title targets and sibling drift, then verifies restoration. The companion document-editor PR #289 applies this contract across its assistant workspace.

Clarify constrained-pane command hierarchy: remove redundant group enclosures while retaining recognizable resting affordance for standalone native buttons. Flat rows suit established menu/list contexts; they are not mandatory for all settings commands. Every persistent outline, surface fill or separator needs a distinct job; a nested card and row rules must not repeat grouping already expressed by type, alignment and proximity. Preserve functional field frames and focus/selection cues, separate destructive commands from explicit confirmation, and inspect the complete pane when accepting a composition. Require shared icon/checkbox and text columns across adjacent controls, distinguish hit-target gutter extensions, and inspect the resting full pane without relying on hover or cursor changes. Carry the rule into the verification brief and English/Chinese guides.

Risk Analysis

Risk Level Mitigation
Consumers interpret example dimensions as library defaults Low Keep dimensions in host aliases and explicitly document their scope
Geometry checks silently accept empty or wrong targets Low Reject missing/empty targets, compare independent expected edges, and exercise deliberate mutations
Consumers remove functional boundaries while simplifying nesting Low Explicit exceptions retain editable-control frames, independent interaction regions and focus/selection state cues

Design Decisions

  • Measure DOM Ranges and real documented shadow parts separately from host frames.
  • Keep hit-area sizing independent of flexible layout filler and typography.
  • Use spacing and alignment for command grouping, and justify functional button surfaces separately from group wrappers. Verify resting discoverability and shared adjacent-control columns in the full composition.
  • Use the existing testing seam; the new geometry helpers are source-only test utilities.

Code Concerns

No outstanding actionable findings after review.

Verification

  • pnpm verify:links, pnpm verify:docs, eight-locale checks, changed-file Prettier and git diff --check passed.
  • ranui and docs design checks passed with unchanged existing baselines.
  • pnpm -F ranui test: 1,577 unit/integration tests and 76 SSR tests passed; typecheck passed.
  • pnpm -F ranui build and pnpm -F docs test passed (145 docs tests).
  • Interface guidance checks: 9 passed.
  • Layout browser matrix: 24 passed across Chromium, Firefox, WebKit and Mobile Chrome. Reverse checks include 8px text-only drift with unchanged frame, filler-sized hit zones and sibling drift.

Conclusion basis: real-browser geometry, pointer/keyboard paths, mutation/restoration checks and local package gates. CSS zoom is reflow stress coverage; native browser zoom remains a consumer acceptance responsibility.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Deploying ran with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5ee4efa
Status: ✅  Deploy successful!
Preview URL: https://9fbaa387.ran-4ty.pages.dev
Branch Preview URL: https://codex-layout-contract.ran-4ty.pages.dev

View logs

@chaxus chaxus changed the title docs(ranui): enforce rendered layout and hit-area acceptance docs(ranui): clarify layout alignment and boundary hierarchy Oct 20, 2026
@chaxus
chaxus merged commit a20b5dd into main Oct 21, 2026
14 of 15 checks passed
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