Repository navigation
test(Popover): the rendering proof waits for the content to settle - #10326
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Popover · Storybook | 78.7 kB (0) · 13.4 kB CSS (0) | 1,488 (0) | ✓ · ✓ · ✓ |
Package size: no published package changed; no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 19 rows, core 24 rows; run pnpm api:report.
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
|
/approve-spec dbaa9a4 |
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Changes requested: one fix in the new window-start logic.
- The rendering windows wait only for the first hit-area inset write (
PopoverTouchMotion.interaction.browser.spec.ts:726-729), so when a stall delays the hit-area pass and its 4 ms frame budget (utils/hitArea.ts:642) splits the three Switches across frames, the later writes still count in the presentation window (reproduced: Layout 6, Paint 2); extend the start through each write that lands before the previous one has drawn.
Otherwise the proof stays strict, since both zero assertions and the frame-loop control are unchanged, and a stall that only delays the pass now leaves the window clean where the base version fails. Minor: the first commit's message still describes a computed will-change check, but the code reads inline styles. CI has not run yet because this pull request is a draft.
[Automated review]
Each switch in the story promotes its fades as the story mounts and ends that promotion 500 ms later, with a style write. The rendering proof opens the popover about 215 ms after the mount, so the write lands in the growth, where Chromium lays out the anchored layer for it. On a loaded machine it lands inside the counted window. Before it opens the popover, the proof now waits until no element in the content holds a motion promotion in its inline styles: a will-change, or the custom property that promotes a ::before or ::after. The counts stay strict: 0 Layout and 0 Paint.
Each motion's start measures the content's touch hit areas: layout reads, then a style write. Both lay out the anchored layer, and a stalled machine can delay them past the window's 400 ms start. Each window now starts no sooner than the frame that draws those insets, seen through a mutation observer, which reads no layout.
A stall can push the hit areas' insets frame so late that little or none of a window is left, and an empty window counts 0 Layout and 0 Paint. Each window must now span at least 300 ms, or the proof fails and says when the hit areas drew.
The hit areas' pass measures a few controls a frame, within a 4 ms budget, so under load its inset writes spread over several frames. A window now starts after the frame that draws the last write of the pass: each write that lands before the previous one has drawn joins it.
dbaa9a4 to
51a3e06
Compare
|
/approve-spec 51a3e06 |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft, and marking it ready for review starts it.
The rendering windows now start after the last inset write of the hit-area pass, so a stall that spreads the pass over several frames leaves the presentation window at 0 Layout and 0 Paint, where the base version counts 10. Both zero assertions and the frame-loop control are unchanged, so the proof stays strict.
[Automated review]
Maintainer impact
The Popover rendering proof fails under load: 2 Layouts at +417 ms in #10169's CI.
Intended invariant
component:PopoverPR4: "On a page with no other frame work, the touch growth and shrink do no Layout or Paint per frame".Cause
--astryx-motion-will-change-after: opacityat story mount and removes it 500 ms later, about 285 ms into the growth, laying out the anchored layer (the CI shape); late timers move it past 400 ms.Change
One test file, four commits, +123 −11:
will-changestaysopacityunder touch.Review bar
toBe(0)unchanged.Evidence
main, Layout 2; b90572b (the block after the first frame) on the first commit, Layout 6; 01c589c (that block, one control a frame) on the third, Layout 6.Scope
Testing