mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 09:42:01 +00:00
Updating a main from a copy with a name override renamed the component and its main to the copy's name. A variant takes its name from its set, though, and every member carries it, so a renamed copy of a variant left the file failing validation (a variant main and component with a name other than their set's). Updating the main of a variant copy now pushes everything but the name, and the copy keeps its name as an override. The component model and its update-main check expect the same. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | world | baseline | now | ratio | |------------------------------------+----------+---------+-------| | deepest-edit-through-three-levels | 35.215 | 20.618 | 0.59 | | edit-through-a-chain-of-dependents | 68.931 | 40.714 | 0.59 | | library-update-into-copies | 83.083 | 49.993 | 0.60 | | main-edit-among-many-shapes | 4.837 | 2.112 | 0.44 | | main-edit-into-10-copies | 1.790 | 1.105 | 0.62 | | main-edit-into-100-copies | 15.415 | 9.427 | 0.61 | | main-edit-into-1000-copies | 153.086 | 101.540 | 0.66 | | variant-switch-into-copies | 32.052 | 21.918 | 0.68 | AI-assisted-by: claude-opus-5-5