Block overloaded public inputs in AST-002 - #5824
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
/approve-spec 77f4e79 |
Contributor
PR Analysis Report
No new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | View full report |
cixzhang
marked this pull request as ready for review
September 1, 2026 16:36
Contributor
Author
|
/approve-spec 77f4e79 |
freddymeta
added a commit
that referenced
this pull request
Sep 2, 2026
… connector short of the indicator (#5495) * feat(Stepper): --step-connector-gap, so a theme can stop the connector short of the indicator Squashed to one commit: the branch had eleven, five of them merges from main, and the net change is five files. The on-track layouts draw the connector as one segment either side of the node. A theme wanting a hole around the indicator had to reach the two segments separately, and they differ only by sibling position — which changes with indicator="none". One public var does it instead. Addressing the review: ROOT-OWNED. The default is declared once on the Stepper root, not on each connector. Per-connector, every connector re-declared 0px on itself, and a declared value beats an inherited one — so the generated `stepper` override compiled cleanly and changed nothing. Verified through the built-theme path: an override on `.astryx-stepper` in @layer astryx-theme now moves the paint. ONE DECLARATION FOR BOTH LAYERS. The gap has to reach the track (the segment's own background) and the fill (an absolutely placed ::before). Padding on each meant two declarations on two boxes, so a percentage resolved against a different containing block for each and stopped them ~1.2px apart. A single clip-path: inset() on the segment clips element and pseudo-element together against one reference box. That also answers #5824, which landed after the review: a public input must hold one stable meaning across its FULL value domain and every accepted input shape. "Documented as a length, percentage bounded but imprecise" does not meet that bar. Clipping does — every value behaves the same way on both layers. SAFE BOUNDS. Measured by reading painted pixels down a 12px segment: 6px -> 6px clipped 1rem -> capped 8px -4px -> 0 (invalid inset) 999px -> capped 8px 10% -> 1px 50% -> capped 6px Stepper height unchanged in every case; clipping cannot affect layout, so the node the segment positions cannot move. NO INDICATOR, NO GAP. indicator="none" renders no node, so a gap there punches a hole in a track meant to be continuous. 8600 core tests, check:repo green, lint and tsc clean. * fix(Stepper): mirror the connector clip under RTL, and add the record that owns the gap Rebased onto the clip-path revision. Two things it still needed. **RTL.** `clip-path: inset()` is physical — top/right/bottom/left, no logical form — but the horizontal row reverses under `dir="rtl"`. Unflipped, the leading segment sits to the RIGHT of the node in RTL and still clipped its right edge, so the hole opened at the join between steps instead of at the indicator. Measured before: `con0 x=622` against `indicator x=606`, clipping its right edge. After: clips its left edge, LTR unchanged. The block axis needs no handling; `dir` does not reverse it. **The owning record.** `spec:AST-002` FR12 rejects a public-API addition whose canonical owning record is missing, and component-local semantics belong in the component spec. Stepper had none. `Stepper.spec.md` (draft) now carries DEC-1 with the admission argument INV10/INV11 require, measured rather than asserted: a theme target reaches the element and never its `::before`, so `paddingBlock: 6px` on `step-connector` produces no hole at all and only grows the Stepper 108px -> 120px. Plus the value contract and the anatomy map. `Stepper.doc.mjs` gains the anatomy entries `stepper`, `step` and `step-connector` never had, so every current target is anchored to a described part (INV2). Connector is one part with one target; the pieces the on-track layout draws it from stay implementation. Also corrects the clamp rationale, which measurement contradicted: a negative `inset()` is ACCEPTED by Chromium — `inset(0 0 -4px 0)` computes as written — which is the opposite of padding, where CSS clamps it for you. The floor is therefore load-bearing here, but not because the declaration would be dropped. * test(Stepper): prove connector gap theme path * docs(Stepper): ratify connector gap contract --------- Co-authored-by: freddytan <freddytan@41831.od.fbinfra.net> Co-authored-by: freddymeta <freddymeta@users.noreply.github.com> Co-authored-by: freddymeta <170298698+freddymeta@users.noreply.github.com> Co-authored-by: Cindy Zhang <cindyxz@meta.com>
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.
Why
A public input can appear to expose one axis while controlling additional axes for selected values, forcing consumers to know implementation branches and conditional override rules.
Semantic before → after
Before: AST-002 rejected derivable or unclear public choices but did not explicitly prohibit one input from changing which axes it controls across values or shapes. After: every public input has one stable caller-owned meaning; a cohesive semantic status or variant may still derive multiple visual details, while independently owned axes and any override precedence must be explicit and conflict-safe.
Example
TableRowStatus.colorcurrently controls tone alone for palette/raw values, but controls tone plus a default themed icon forsuccess | warning | error; optionaliconthen conditionally overrides representation. The amendment rejects that shape pending a canonicalcomponent:Tablecontract without prescribing its replacement.Risk
Documentation and review policy only. Existing released APIs are evaluated when touched, not automatically broken. The staged exception for missing current authority remains unchanged.
Testing
pnpm exec prettier --check docs/specs/AST-002/spec.md docs/contributing/api-conventions.mdpnpm check:knowledge -- --base origin/mainpnpm exec vitest run scripts/check-knowledge.test.mjs(60 passed)pnpm check:repoNo Changeset: no published package behavior changes.