feat(layout): add the layout engine, generators and fill #30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/m3-layout-engine"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Test plan
pnpm testgreen: 253 tests, 140 of them new across metrics, measure, layout, resolve, sheet, generators and fillpnpm lint,pnpm buildand prettier greenReview of this branch at medium effort, five findings. The two that matter are fixed here.
Fixed
isSizedclaimed every kind buttextandcirclecarriedwidthandheight, andResolvedFillcarries neither. Measuring any container holding afillthrew aTypeErrorout ofintrinsicExtent; not aSpecError, soattemptrethrew it andlayoutTemplatetook the whole sheet down - the white screen decision 6 exists to prevent. Reachable from a parse-valid template:row > stack (auto width, stretched height) > rect { repeat: fill }. Regression test added. (1fd721c)measureContaineradded a fill's sample extent along the container's main axis, which is not what a fill contributes there. Latent, since the spec rejects a fill under an auto parent and the figure was always discarded, but it disagreed withexpandFills, which already skips fills. (0802818)Left for a follow-up
edgesOfandnum(resolve.ts:297,:323) accept negative padding, gap and radius, while theme lengths go throughmmSchema(positive()).padding: -50draws children off the page with an emptyerrorsarray.rootOf(sheet.ts:49) reusestemplate.root.idfor the synthetic wrapper stack, so under decision 21 a wrapper-charged cap error is indistinguishable from an iteration's.'align' in parent ? parent.align : 'stretch'(fill.ts:59) misreads an explicitly-undefined align;parent.align ?? 'stretch'is the robust form. Same shape atfill.ts:45andresolve.ts:288.Test plan
pnpm test254 passed,tsc --noEmitclean,eslint .clean