mirror of
https://github.com/penpot/penpot.git
synced 2026-08-19 11:19:10 +00:00
The ShapeProxy `borderRadius` setters (`borderRadius` and the four per-corner variants) validated with `sm/valid-safe-int?`, so a fractional radius (e.g. `shape.borderRadius = 7.5`) was rejected as invalid. The data model types `:r1`-`:r4` as `::sm/safe-number` (shape.cljc), the radius sidebar input only constrains `min 0` (not integer), and `set-radius-*` store the value verbatim — so the plugin API was stricter than the model. Same class of defect as the merged #9780. Switch those 5 guards to `sm/valid-safe-number?`, keeping the existing non-negative guard on the all-corners setter. Integer-only setters in the file (`getRange` bounds, `setParentIndex`) keep `valid-safe-int?`. Adds a regression test asserting fractional radius values are accepted (with throwValidationErrors enabled). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Filip Sajdak <filip.sajdak@siili.com>