mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 09:42:01 +00:00
A constraint applies to the resizes after it, so changing the constraint of a copy shape moves nothing. But a later sync placed the shape from its main through the new constraint, as if it had applied to the copy's earlier resize too, so the same copy showed two places depending on the sync. A copy shape whose constraint changes in a board sized apart from its main's along that axis now authors its geometry: it keeps its place, and later resizes of the board move it through the new constraint. The frontend's shape update runs the check after any update that marks overrides. Tests: centring-a-nested-copy-after-its-copy-resized-keeps-its-children-in-place (the stale gate program of seed 151006440); a-constraint-a-copy-sets-after-a-resize-moves-nothing-at-sync expects the override now. 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.443 | 22.755 | 0.61 | | edit-through-a-chain-of-dependents | 68.931 | 40.138 | 42.216 | 0.58 | | library-update-into-copies | 83.083 | 51.127 | 55.671 | 0.62 | | main-edit-among-many-shapes | 4.837 | 2.516 | 3.029 | 0.52 | | main-edit-into-10-copies | 1.79 | 1.11 | 1.148 | 0.62 | | main-edit-into-100-copies | 15.415 | 9.991 | 10.514 | 0.65 | | main-edit-into-1000-copies | 153.086 | 97.388 | 114.808 | 0.64 | | variant-switch-into-copies | 32.052 | 21.907 | 23.988 | 0.68 | AI-assisted-by: claude-opus-5-5