Repository navigation
docs(architecture): the layer runtime's keyboard cap in INV11 and INV12 - #10143
Conversation
INV11 names the software keyboard's cap among the viewport caps, and the overflow each layer carries beside it. INV12 names the cap as the second change permitted after paint: once per keyboard movement, and after a press's click. It also names where the cap reads the layer's box. The change coupling, owning code and verification sections name the cap's checks, its modules and its tests.
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
|
/approve-spec b88b025 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. It runs once the pull request leaves draft and a maintainer adds the ci:run label.
The new INV11 and INV12 text in the layer runtime record matches the keyboard-cap rules of the Layer viewport inset spec (AST-059 FR8-FR10) and the runtime as it ships. An engineering owner has approved the one sentence that goes beyond that spec, the overflow each layer carries beside the cap. Every file the record names exists at this head.
[Automated review]
…and keeps its top (#10169) * docs(architecture): the layer runtime's keyboard cap in INV11 and INV12 INV11 names the software keyboard's cap among the viewport caps, and the overflow each layer carries beside it. INV12 names the cap as the second change permitted after paint: once per keyboard movement, and after a press's click. It also names where the cap reads the layer's box. The change coupling, owning code and verification sections name the cap's checks, its modules and its tests. * fix(Layer, Selector): the overlay slides above the software keyboard The layer runtime now writes the software keyboard's block-end inset on each open anchor-mode layer, beside its keyboard cap: the keyboard's height and the 10 px clearance. It is a private custom property that only the runtime writes. It goes out in the commit that lifts the cap, before the cap reads the layer's box. Selector's selected-item overlay reads it as a CSS term of its block-start margin. With a keyboard up, the list ends above the keyboard instead of shrinking to a sliver or opening under it. Without one, the measured shift stands. * Merge #10143 into the keyboard inset The layer-runtime record's keyboard cap text comes with #10143. * fix(Layer, Selector): the overlay keeps its top until it closes The runtime now keeps the keyboard inset at its largest value until the layer closes. Selector's overlay reads it, so it keeps its top when the keyboard's report ends: a list the cap held grows downward in place. A keyboard that rises while it is open still moves it up above it, and a shorter keyboard then leaves it there. Every other anchored layer keeps its timing: its cap still lifts at once as the keyboard goes down. The layer-runtime record states this beside the keyboard cap. * docs(Selector): trim two overlay comments The overlay margin property's comment keeps only its constraint, and the margin field drops a note that restated its name and type. * docs(layer-runtime): the held inset covers any reported keyboard The INV11 line about layers that read the keyboard inset now says a layer placed while a keyboard is reported, which is what the runtime does: it cannot tell a lingering report from a keyboard that was up. * Merge main into the layer keyboard inset branch (#10143 landed) * Merge main into the layer keyboard inset branch Main brought the exit copy's INV13 row (#8186), the searchable Selector trigger's name (#10170) and AST-059's scroll placement (#10255, #10257, #10289). Their verification tables re-padded, so each conflicted as a whole table. Resolved row by row: the layer-runtime table keeps this branch's INV11, INV12 row, then main's INV13 row. AST-059's table keeps main's FR4 tooltip row and new scroll row, with this branch's FR9 row. Selector's table keeps main's AR1, AV2 row and this branch's FR2 row. * Merge branch 'main' into uikit/layer-keyboard-inset Co-authored-by: Cindy Zhang <cindyxz@meta.com>
Reader impact
architecture:layer-runtimedoes not state the software keyboard's cap, though every anchor-mode layer ships it. A reviewer of a cap change has no invariant to check it against. The cap's one change per keyboard movement reads as a paint-then-shift defect under INV12 as written.Source of truth
spec:AST-059FR9 and FR10, and its current-state impact list forarchitecture:layer-runtime. The runtime'sLayer/useLayerKeyboardClearance.ts,Layer/layerKeyboardClearance.ts,Layer/settledBox.tsand the keyboard cap style inLayer/useLayer.tsxmatch it, as shipped in #8208.Correction
Evidence
pnpm check:knowledge: templates and records are aligned.pnpm specs:for --diff origin/mainroutes no claim beyond the record's own.Layer/LayerTouch.ts, and the verification row's unit test and two browser specs.Writing rubric results
Scope
Testing
pnpm check:knowledgegit diff --check