openpencil/tests/engine/clipboard
Danila Poyarkov 099e5d7a15
fix(fig): keep filled frames and copied text sized as in OpenPencil when exported to Figma (#956)
* fix(fig): keep filled frames fixed along the axis they fill

Figma stores fill on the child and keeps that axis fixed in the frame's
own sizing; a hugging value there wins over the stretch or grow. A row
filled across a vertical card, or an instance stretched to the card's
width, was written with its own sizing still hugging, so in Figma the
row shrank and pushed its badge against the title, and the button
shrank to its label.

The .fig and clipboard writer now writes a filled axis as FIXED, both on
the frame's own record and in an instance's sizing override, which Figma
applies over the record. Unedited imported layers keep their stored
sizing, since Figma's own files also hold hugging axes on stretched
children.

* fix(clipboard): keep how text resizes when copying to Figma

The Figma clipboard writer forced every text record to a fixed size and
layout version 5. Figma then kept the width OpenPencil measured instead
of laying the text out in its own font, so labels it draws wider
overflowed or wrapped: a pricing card's title ran under its badge and
its button label broke onto two lines. Text now keeps the auto-resize
and layout version the .fig writer gives it, as Figma's own files store
them, and a paste into Figma 126 grows each label to fit.
2026-10-07 18:05:23 +00:00
..
figma fix(fig): keep filled frames and copied text sized as in OpenPencil when exported to Figma (#956) 2026-10-07 18:05:23 +00:00
fixtures test: extend timeout for slow gold-preview fixture tests 2026-06-19 11:05:25 +10:00
openpencil refactor!: move shared primitives below dom-css and core (#771) 2026-09-26 11:39:11 +04:00