Repository navigation
feat(Stepper): --step-connector-gap, so a theme can stop the on-track connector short of the indicator - #5495
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsStepper (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. Stepper - 1 issue(s)
Visual Regression12 added · 0 removed. View the report A repository maintainer can accept these exact frames: Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
left a comment
There was a problem hiding this comment.
Thanks — the prior approve still holds after the main refresh and undraft. segment reaches all connector roles, including indicator="none", with no default pixel change.
[Reviewed by Robohands]
|
/accept-visual |
|
Visual acceptance refused: copy the exact |
|
/accept-visual 33046093232/1 These frames show the intentional step-connector segment states on the existing painted target; the theme-state mapping is the reviewed change. |
|
Visual acceptance refused: only a repository maintainer may accept stable visual changes. |
|
Merged latest main (17 commits behind) — which also regenerates the visual evidence, since the report from 27 Aug had expired to a 404 and Component suite re-run green on the merge. No source change in this push. |
cixzhang
left a comment
There was a problem hiding this comment.
segment is not ready as public theming vocabulary. It emits collision-prone global classes (lead, rail, content), generated docs expose neither valid values nor their layout-specific meanings, and bogus values build silently.
Please first decide whether these roles are a stable public contract. If so, namespace, document, and validate the exact closed vocabulary and availability.
[Reviewed by Robohands]
100826e to
7360665
Compare
|
Squashed to one commit — the branch had eleven, five of them merges from main, and the net change is five files. Both findings were real; here is each, measured. 1 · Root-owned varCorrect, and the reason it slipped through is worth recording: the reachability gate sets the var on The default is now declared once on the Stepper root. Verified through the built-theme path rather than the gate's: 2 · Value/state contractAll four reproduced. Chromium, vertical on-track, 180px stepper:
The cap is the flexible segment's own Track and fill both spend it as padding now, instead of padding on one and an inset on the other — One thing I could not closeA percentage still resolves, and track and fill differ by ~1.2px — measured The cap bounds it to sub-pixel rather than unbounded, and the var is documented as a length. CSS cannot reject a unit without If you would rather percentages were impossible than bounded, the route I can see is 8600 core tests, |
|
Both your points hold up, and both are covered below. But going back through The admission argument was missing, and I had not proved itINV10 admits a public custom property only when no guaranteed CSS property can express a caller-owned need, and INV11 says the same from the API side. The catalog deliberately excludes I assumed not. I have now measured it, in Chromium, against a real
Three separate reasons the guaranteed-property route cannot do it, all measured:
So the var survives the bar — but the argument for it belonged in a record, and per While writing the map I hit INV2: 1 · Root-owned varCorrect. Negative control — default moved back onto the connector, everything else identical, theme still setting Test suite catches it: The authoring contract agrees — 2 · Value/state contract
Negative control on the cap: remove it and Negative control on the fill: drop the One correction to my own last comment. I said a negative value drops the declaration and paints the track through the node. That is wrong, and I should not have written it without checking. Chromium resolves
Gates
Full Merged |
…r 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.
be83b1a to
38ba174
Compare
|
Re-evaluated against #5824, which landed after your review. It closes the gap I said I could not close — my previous comment is stale on that point. The new rule:
I had left Fixed by removing the second declaration rather than documenting around it. The gap now clips instead of padding — one Painted pixels down a 12px segment, through a built theme override: Stepper height unchanged in every case — clipping cannot affect layout, so the node the segment positions cannot move. That also retires the 180→240px growth separately from the cap. Everything in my previous comment still stands: root-owned default, clamped bounds, no gap when |
… 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.
|
(Replaces my previous comment, which was too long — and partly stale: the branch was force-pushed to the
One real bug in it: RTL.
LTR byte-identical. Fixed with the house pattern ( The admission argument, which neither of us had named. The argument itself, measured rather than asserted — can
It can't: the connector paints in two layers — the element (track) and a Also added anatomy rows for Gates: 8957 tests pass; build, typecheck, typecheck:docs, check:repo clean; One open question I couldn't close (recorded as OQ1 rather than papered over): a percentage resolves against each segment's own box, so a fixed and a flexible segment clip by different amounts. Both layers of any one segment agree exactly and the cap bounds it, so I documented it as accepted. |
|
Addressed the latest review on the refreshed current-main head:
Real browser proof using CSS emitted by — Puck, on behalf of Freddy |
cixzhang
left a comment
There was a problem hiding this comment.
Spec reviewed against the component contract template, current theming-surface architecture, and AST-002. Ratified: Connector is the optional on-track anatomy; its component-owned inner gap is an appropriate public semantic CSS variable because existing target properties cannot express it across both paint layers.\n\nApproved at exact head a786939.



Problem
In the on-track Stepper layout, the connector runs through the indicator. Themes sometimes need a deliberate gap around that node, but the existing
step-connectortarget cannot create it reliably: the connector paints both its own background and an accent::before, while a theme target reaches only the element.Change
Adds the documented public custom property
--step-connector-gap:0px, preserving existing pixels.stepperroot, so generated theme CSS can override it and connectors inherit it.clip-path: inset()clips the track and its::beforefill together.0 … --spacing-2; clipping cannot resize the Stepper.indicator="none"leaves the connector continuous.The draft
Stepper.spec.mdowns the API admission argument, value contract, representative states, and anatomy-to-target map.Verification
.astryx-stepper, never.astryx-step-connector.astryx theme build:0px6px6px60px