Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewModified ComponentsPopover (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression15 of 420 shot(s) changed. A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Thanks for closing this gap — the mechanism is clean: one shared set of gutter expressions, the existing spacing-4 + safe-area part preserved, and a 0px default so nothing moves for apps that do not opt in.
Two things stand in the way of approval:
-
A maintainer spec decision is needed first. This adds four new public custom properties (
--astryx-layer-inset-block-start,--astryx-layer-inset-block-end,--astryx-layer-inset-inline-start,--astryx-layer-inset-inline-end), a newlayerInsetVarsexport, and new gutter semantics across Popover, DropdownMenu and its submenus. No current governing spec names these properties, the export, or the additive semantics — the existing Popover contract covers viewport and safe-area capping only. Approval needs a maintainer to provide or identify the governing spec for this addition, settling the property names, the additive-over-safe-area semantics, and the Popover + DropdownMenu scope. This is not a request to remove or split the change. -
The new Layer theming doc breaks the docs build. The
themingobject added toLayer.doc.mjsdeclares onlyvars, but the doc schema requires atargetsfield, sotypecheck:docsfails (TS2741: Property 'targets' is missing) and the Storybook and docsite builds fail with it. Giving thethemingobject a validtargetsdeclaration, or moving the vars to a doc whose theming satisfies the schema, should fix it — please re-run the docs typecheck afterwards.
[Automated review]
There was a problem hiding this comment.
Thanks for closing this gap — the mechanism is clean: one shared set of gutter expressions, the existing spacing-4 + safe-area part preserved, and a 0px default so nothing moves for apps that do not opt in. The docs build failure from the earlier revision is also fixed, and CI is green apart from the pending spec-owner approval.
One thing still stands in the way of approval:
A maintainer spec decision is needed first. This adds four new public custom properties (--astryx-layer-inset-block-start, --astryx-layer-inset-block-end, --astryx-layer-inset-inline-start, --astryx-layer-inset-inline-end), a new layerInsetVars export, and new gutter semantics across Popover, DropdownMenu and its submenus. No current governing spec names these properties, the export, or the additive semantics — the existing Popover contract covers viewport and safe-area capping only, and the DEC-4 / FR8 record proposed in this PR is itself marked pending owner review. Approval needs a maintainer to provide or identify the governing spec for this addition (or approve the proposed DEC-4 / FR8 as that record), settling the property names, the additive-over-safe-area semantics, the export, and the Popover + DropdownMenu scope. This is not a request to remove or split the change.
[Automated review]
kentonquatman
left a comment
There was a problem hiding this comment.
Looks good!
Tested with this code: Playground link
… bar floating over the viewport is declared once
…list; DEC-4 pending owner review records the per-edge viewport inset
…ocumented in prose rather than as theme-target vars
…es are the contract; DEC-4 decider line names only the PR
aea4ffc to
c40c6e6
Compare
There was a problem hiding this comment.
Thanks for closing this gap — the mechanism is clean: one shared set of gutter expressions, the existing spacing-4 + safe-area part preserved, and a 0px default so nothing moves for apps that do not opt in. The docs and export issues from earlier revisions are also fixed, and CI is green apart from the pending spec-owner approval.
One thing still stands in the way of approval:
A maintainer spec decision is needed first. This adds four new public custom properties (--astryx-layer-inset-block-start, --astryx-layer-inset-block-end, --astryx-layer-inset-inline-start, --astryx-layer-inset-inline-end) and new additive gutter semantics across Popover, DropdownMenu and its submenus. No current governing spec names these properties or the additive semantics — the existing Popover contract covers viewport and safe-area capping only, and the DEC-4 / FR8 record proposed in this PR is itself marked pending owner review. Approval needs a maintainer to provide or identify the governing spec for this addition (or approve the proposed DEC-4 / FR8 as that record), settling the property names, the additive-over-safe-area semantics, the Popover + DropdownMenu scope, and documenting the properties as app-level :root declarations rather than theme-target vars. This is not a request to remove or split the change.
[Automated review]
* spec(AST-059): the layer runtime owns the viewport inset Gutter, size cap, fallback order, app-declared inset, and the Layer stories move to the layer runtime; Popover keeps its props, styling, scrolling and the explicit-width preference. Supersedes the component-level approach in #6688 and places #6686's inset at the layer. * spec(AST-059): state the system, not the project Rubric pass (docs/contributing/spec-writing.md): the Intent names the behaviors rather than the changes that reached for them; no pull request remains as standing content; the open-pull-request and follow-up sections are gone (their durable facts are in the FRs; the rest is for the pull request description); rejected alternatives are one line each. * spec(AST-059): the app declares its floating bar on LayerProvider FR6 and DEC-4 rewrite on the owner's ruling: LayerProvider carries the inset, typed beside toast, with zero defaults; anchored layers and the toast viewport read one declaration (DEC-5). toast.inset stays as the per-edge toast override. Custom properties are the mechanism, not the API. * spec(AST-059): the first frame is the settled frame; the layer box never exceeds the viewport FR8: a layer MUST NOT paint at a geometry it is about to correct; every geometry input resolves in the same frame as the render that produced it and the runtime measures nothing after paint. FR2/FR3: the layer box never exceeds the cap; content that cannot fit overflows inside. Verification rows name both viewports and the first-frame comparison. * spec(AST-059): current — approved by the owner on 2026-10-03 /approve-spec clears the merge gate; the record's own authority is written here: authority current, approved_by cixzhang, phase accepted, DEC-2 and DEC-5 as the owner's decisions. * spec(AST-059): the gutter bounds position on the placement axis; a span last resort * spec(AST-059): the placement-axis positional gutter is one value for both edges * spec(AST-059): nested provider narrows the inset; VG1 slide-then-return
|
Closing as superseded by #6919 (spec:AST-059): the per-edge viewport inset shipped as the |
User need
An app that keeps a persistent bar floating over one viewport edge — a phone navigation bar fixed over the bottom, a docked toolbar — has no way to tell Astryx layers the bar is there. The bar contributes no layout height, so a Popover or DropdownMenu the browser has correctly fitted to the viewport (spacing-4 +
env(safe-area-inset-*)gutter) still ends underneath it, and the rows nearest the bottom are covered. The gutter is a fixed constant in three components; the only out is a theme override of each component's max-size expression, which drops the safe-area term and repeats the bar on every surface.Problem and solution fit
--astryx-layer-inset-block-end,--astryx-layer-inset-block-start,--astryx-layer-inset-inline-start,--astryx-layer-inset-inline-end— each added to the existing gutter for its edge and reading0pxunless set. The app declares the bar once, on:root.Layer/layerViewportInset.stylex.tsholds the gutter expressions (StyleX inlines cross-file values only from a.stylex.ts); Popover, DropdownMenu and DropdownMenuSubMenu read it in place of their three identical copies, so "every fitted layer" is true rather than Popover-only. Tests, docs, a changeset, contract text.layerInsetVarsbarrel export of the property names — the properties are the whole contract.Current specification
component:Popover(Popover.spec.md,authority: current) FR3/ORD3 settle viewport and safe-area fitting but no app-declared inset;architecture:layer-runtime(current) owns anchor geometry and places viewport sizing with Popover. This PR adds FR8 and DEC-4 to the Popover record and the owning-code line to the architecture record, both marked pending owner review — the one unresolved owner decision.Public delta and caller burden
gutter = max(--spacing-4, env(safe-area-inset-*)) + var(--astryx-layer-inset-*, 0px). Unset → released geometry, byte for byte.Popover,usePopover,useLayerorDropdownMenu.theming.vars.Design and alternatives
100dvb/100visizing; the safe-areaenv()terms stay physical as before.Evidence
layerViewportInset.test.ts: one property per edge; each gutter adds its inset to the safe-area term and reads0pxunset; the paint-time inline gutter reserves the larger inline inset;env()-less fallbacks keep the insets.Popover.test.tsx: the block-size cap subtracts both block insets; a side placement's block margin and the aligned inline gutter carry their insets; existing min-width contract strings updated.DropdownMenu/DropdownMenuSubMenutests: max-height / min-width contract strings updated.Scope
Testing