mirror of
https://github.com/penpot/penpot.git
synced 2026-10-03 01:06:14 +00:00
The json reader of the binfile v3 import rewrites every key of every entry to kebab-case, nested maps included. Shape `:svg-attrs` is the one map whose keys are camelCase react prop names, because the svg import path runs them through `attrs->props`, so an attribute exported as `fillRule` came back as `:fill-rule` and was stored that way. The renderer looks the attribute up by its camelCase name, does not find it and falls back to the default fill rule, so a shape exported with `fillRule: evenodd` was painted without its hole, and the attributes panel showed `fill-rule`. `clean-shape-post-decode` already runs on every shape right after the schema decode, for page shapes and component objects alike, so the repair goes there: run `:svg-attrs` back through `attrs->props`, the same transform that built the keys. It is idempotent, so shapes that arrive correct are left untouched. The new tests import a real export that carries the attribute, for page shapes and component shapes. Closes #11954 AI-assisted-by: space-bunny-free