#471

fix(canvas): measurement, container border, nested accordion, and animation transform fixes

Openrdevwants to merge intofrom

Summary

  • Measure a wrapped paragraph at the width it actually lays out at. A paragraph that caps its own width (max_size.width or 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.border on 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. disclosureContentBottom walked 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 test on macOS with Zig 0.16.0: passed.
  • scripts/gate.sh fast: every step passed except examples-mobile, which needs the Android NDK. The NDK isn't installed here, and upstream main fails the same way.
  • New tests render overrides compose in view space over a command's local transform and a closed nested accordion does not keep its open parent from settling fail without their fixes.