Skip to content

Tell package authors to paint from frameFor, not inside a sizeObserver delivery - #6349

Merged
leaf-agent merged 1 commit into
mainfrom
docs/size-delivery-paints
Nov 18, 2026
Merged

leaf-agent merged 1 commit into
mainfrom
docs/size-delivery-paints

Conversation

@leaf-agent

Copy link
Copy Markdown
Collaborator

module-authoring.md's "Scheduling paints" now says a sizeObserver callback should schedule a paint from frameFor rather than draw, and why: when a widget's drawing settles inside a size delivery, Leaf presents the page in that delivery. That moves boxes the browser has just measured, and the browser reports a ResizeObserver loop, which page check counts as a fault.

The maintainer decided on #6147 to fix this in the package contract, not in core. Page readiness stays as it is, and each widget keeps its own deferral, as lf-chart, lf-diagram and lf-shot already do. Only the reference changes, with no code change. The tests that read this file (test_interact_layer.py's role-table check) pass.

Closes #6147

…r delivery

`module-authoring.md`'s "Scheduling paints" now says a `sizeObserver` callback should schedule a paint from `frameFor` rather than draw, and why: when a widget's drawing settles inside a size delivery, Leaf presents the page in that delivery. That moves boxes the browser has just measured, and the browser reports a ResizeObserver loop, which `page check` counts as a fault.

The maintainer decided on #6147 to fix this in the package contract, not in core. Page readiness stays as it is, and each widget keeps its own deferral, as `lf-chart`, `lf-diagram` and `lf-shot` already do. Only the reference changes, with no code change. The tests that read this file (`test_interact_layer.py`'s role-table check) pass.

Closes #6147
@leaf-agent
leaf-agent merged commit 1289a47 into main Nov 18, 2026
6 checks passed
@leaf-agent
leaf-agent deleted the docs/size-delivery-paints branch November 18, 2026 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A package widget that finishes drawing inside a sizeObserver callback causes a ResizeObserver loop error at page load

1 participant