🐛 Fix 'not ISeqable' error when entering float values in layout/opacity inputs

Replace int? with number? in on-change handlers for layout item margins,
min/max sizes, and layer opacity. Using int? caused float values like 8.5
to fall into the design token branch, calling (first 8.5) and crashing.

Signed-off-by: Andrey Antukh <niwi@niwi.nz>
This commit is contained in:
Andrey Antukh
2026-03-10 12:33:02 +00:00
committed by Alejandro Alonso
parent 1680be33ef
commit 82e3a5fa53
3 changed files with 5 additions and 4 deletions

View File

@@ -37,6 +37,7 @@
- Fix component "broken" after variant switch [Taiga #12984](https://tree.taiga.io/project/penpot/issue/12984)
- Fix incorrect query for file versions [Github #8463](https://github.com/penpot/penpot/pull/8463)
- Fix warning when clicking on number token pills [Taiga #13661](https://tree.taiga.io/project/penpot/issue/13661)
- Fix 'not ISeqable' error when entering float values in layout item and opacity inputs [Github #8569](https://github.com/penpot/penpot/pull/8569)
## 2.13.3

View File

@@ -140,7 +140,7 @@
(mf/use-fn
(mf/deps on-change handle-opacity-change)
(fn [value]
(if (or (string? value) (int? value))
(if (or (string? value) (number? value))
(handle-opacity-change value)
(do
(st/emit! (dwta/toggle-token {:token (first value)

View File

@@ -117,7 +117,7 @@
(mf/use-fn
(mf/deps on-change ids)
(fn [value attr]
(if (or (string? value) (int? value))
(if (or (string? value) (number? value))
(on-change :simple attr value)
(do
(st/emit!
@@ -247,7 +247,7 @@
(mf/use-fn
(mf/deps on-change ids)
(fn [value attr]
(if (or (string? value) (int? value))
(if (or (string? value) (number? value))
(on-change :multiple attr value)
(do
(st/emit!
@@ -577,7 +577,7 @@
(mf/use-fn
(mf/deps ids)
(fn [value attr]
(if (or (string? value) (int? value))
(if (or (string? value) (number? value))
(st/emit! (dwsl/update-layout-child ids {attr value}))
(do
(st/emit!