mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
Under a main parent with no layout, an update main leaves on the copy the layout child attributes it authored, as no layout parent uses them. An update main that pushes a swap adds the copy's subtree to the main instead, with every override it holds, so a maximum width a copy shape authored under the swapped board moved to the main. Pushing a swap now keeps those overrides on the copy shapes and off the new main shapes, as pushing a pair does. Test: updating-a-main-keeps-the-max-width-override-a-switched-copy-holds (the variant gate program of seed 175377838). Benchmark (scripts/bench-components, ms, lower 2.5% quantile), measured with the previous commit's change in the tree as well: | :world | :baseline | :now | :mean | :ratio | |------------------------------------+-----------+---------+---------+--------| | deepest-edit-through-three-levels | 35.215 | 21.071 | 22.737 | 0.6 | | edit-through-a-chain-of-dependents | 68.931 | 44.394 | 45.61 | 0.64 | | library-update-into-copies | 83.083 | 53.752 | 54.632 | 0.65 | | main-edit-among-many-shapes | 4.837 | 2.372 | 2.633 | 0.49 | | main-edit-into-10-copies | 1.79 | 0.997 | 1.029 | 0.56 | | main-edit-into-100-copies | 15.415 | 10.009 | 11.143 | 0.65 | | main-edit-into-1000-copies | 153.086 | 109.767 | 112.342 | 0.72 | | variant-switch-into-copies | 32.052 | 22.182 | 23.614 | 0.69 | AI-assisted-by: claude-opus-5-5