#471
fix(canvas): measurement, container border, nested accordion, and animation transform fixes
Summary
- Measure a wrapped paragraph at the width it actually lays out at. A paragraph that caps its own width (
max_size.widthor an explicit frame width) was measured at its container's inner width, wrapped onto more lines than measured, and the next sibling was placed over its tail, where it also swallowed pointer events aimed at the text. - Measure wrapped overlay content at the surface width. Stacks, panels, and popovers with a definite width and automatic height took each child's one-line height, so a wrapped child clipped its last line and the bottom inset collapsed.
- Paint
style.borderon layout containers. Rows and columns filled their background but dropped the border, while the same property painted on controls and surfaces. - Let an open accordion settle around a closed nested one.
disclosureContentBottomwalked into the closed accordion's concealed content, so the outer accordion never counted as settled open, and everything inside it (the inner header included) stayed un-hittable, unfocusable, and out of semantics. - Apply render animations in view space. The override affine was post-multiplied onto the command's own transform, so it ran through local maps such as a vector icon's viewBox scale: an icon in a sliding panel travelled
offset * icon_scale, lagged its panel, and reported dirty bounds at the wrong place.
Verification
zig build teston macOS with Zig 0.16.0: passed.scripts/gate.sh fast: every step passed exceptexamples-mobile, which needs the Android NDK. The NDK isn't installed here, and upstreammainfails the same way.- New tests
render overrides compose in view space over a command's local transformanda closed nested accordion does not keep its open parent from settlingfail without their fixes.
@rdev is attempting to deploy a commit to the Vercel Labs Team on Vercel.
A member of the Team first needs to authorize it.