mirror of
https://github.com/penpot/penpot.git
synced 2026-10-29 14:00:37 +00:00
A switch picks the variant whose properties are nearest the wanted ones; between equally near ones it took the last child of the variant container. Since combine as variants keeps the order of the components it combines, that is the last of them: switching an empty variant to "primary" gave primary/icon+test where the QA case (PENPOT-2446) expects primary/hover, the first primary variant. It now takes the first child among the equally near ones. variants-switch-target-test: two variants one value away, in both orders of the container's children. Benchmark against the 1e baseline (lower quantile, ms): world baseline now ratio deepest-edit-through-three-levels 35.215 16.810 0.48 edit-through-a-chain-of-dependents 68.931 32.765 0.48 library-update-into-copies 83.083 39.232 0.47 main-edit-among-many-shapes 4.837 2.277 0.47 main-edit-into-10-copies 1.790 0.807 0.45 main-edit-into-100-copies 15.415 8.054 0.52 main-edit-into-1000-copies 153.086 81.186 0.53 variant-switch-into-copies 32.052 17.933 0.56 AI-assisted-by: claude-opus-5-5