feat(widget): animation tick before layout (ADR-032 GAP-3)#164
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Flutter pattern: handleBeginFrame (animate) → handleDrawFrame (layout). Layout must be a pure function of (constraints + widget state) for RelayoutBoundary correctness (Phase 5). Changes: - Add AnimationTicker interface (widget/animation_ticker.go) - Add tickAnimationsInTree walk in Window.Frame() after BeginFrame - Collapsible: TickAnimation() called by framework, Layout() read-only - Transition: TickAnimation() called by framework, Draw() read-only - Fade/Slide: paint-only, keep updateAnimation in Draw, remove ctx.InvalidateRect - Replace ctx.Invalidate() with MarkNeedsLayout() in animation ticks - Update all animation tests to call TickAnimation before Layout/Draw - Update RENDER-PIPELINE.md with Frame() lifecycle (ADR-032 GAP-3) - Update CHANGELOG
kolkov
force-pushed
the
fix/gap3-animation-before-layout
branch
from
July 5, 2026 11:08
eb5fe70 to
75fc459
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Flutter pattern:
handleBeginFrame(animate) →handleDrawFrame(layout). Layout must be a pure function of (constraints + widget state) for RelayoutBoundary correctness (Phase 5).Changes
AnimationTickerinterface — widgets with layout-affecting animations implementTickAnimation(ctx)tickAnimationsInTreewalk inWindow.Frame()after BeginFrame, before layoutTickAnimation()called by framework,Layout()read-only (no mutation)TickAnimation()called by framework,Draw()read-onlyDraw(), removedctx.InvalidateRectcallsctx.Invalidate()withMarkNeedsLayout()in animation ticksTickAnimationbeforeLayout/DrawEnterprise references
scheduler/binding.dart:1226—handleBeginFrame(transient callbacks = animation ticks)rendering/binding.dart:692—drawFrame→flushLayout(after all ticks)Test plan
go build ./...go test ./... -count=1(59 packages, 0 FAIL)golangci-lint run --timeout=5m(0 issues)