mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 17:50:38 +00:00
Ungrouping a group, bool or board inside a main removed it, while its copies kept a shape that referred to it until the next sync, so the file failed validation in between. The ungroup now takes the file's pages and ungroups every shape of the file that refers to an ungrouped one, directly or through other copies, in the same change: its children move to its parent at its place, keeping their overrides, and it is removed. The frontend's ungroup passes the file's pages. Test: ungrouping-a-group-a-main-holds-leaves-no-copy-referring-to-it (the copy's rectangle moves to the copy root with its opacity override). Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | :world | :baseline | :now | :mean | :ratio | |------------------------------------+-----------+--------+---------+--------| | deepest-edit-through-three-levels | 35.215 | 21.54 | 21.937 | 0.61 | | edit-through-a-chain-of-dependents | 68.931 | 42.565 | 43.748 | 0.62 | | library-update-into-copies | 83.083 | 58.686 | 78.974 | 0.71 | | main-edit-among-many-shapes | 4.837 | 2.503 | 3.171 | 0.52 | | main-edit-into-10-copies | 1.79 | 1.039 | 1.105 | 0.58 | | main-edit-into-100-copies | 15.415 | 10.205 | 10.895 | 0.66 | | main-edit-into-1000-copies | 153.086 | 102.64 | 106.511 | 0.67 | | variant-switch-into-copies | 32.052 | 21.481 | 22.871 | 0.67 | AI-assisted-by: claude-opus-5-5