🐛 Fix hidden on multiple selection (#8854)

This commit is contained in:
Eva Marco 2026-04-07 10:58:34 +02:00 committed by GitHub
parent d5855f355f
commit a5055af538
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 4 deletions

View File

@ -33,6 +33,7 @@
- Fix dates to avoid show them in english when browser is in auto [Taiga #13786](https://tree.taiga.io/project/penpot/issue/13786)
- Fix focus radio button [Taiga #13841](https://tree.taiga.io/project/penpot/issue/13841)
- Token tree should be expanded by default [Taiga #13631](https://tree.taiga.io/project/penpot/issue/13631)
- Fix opacity incorrectly disabled for visible shapes [Taiga #13906](https://tree.taiga.io/project/penpot/issue/13906)
## 2.15.0 (Unreleased)

View File

@ -24,7 +24,7 @@
[:and :string [:fn #(contains? icon-list %)]]]
[:label :string]
[:value [:or :keyword :string]]
[:disabled {:optional true} :boolean]])
[:disabled {:optional true} [:maybe :boolean]]])
(def ^:private schema:radio-buttons
[:map
@ -35,8 +35,8 @@
[:name {:optional true} :string]
[:selected {:optional true}
[:maybe [:or :keyword :string]]]
[:allow-empty {:optional true} :boolean]
[:disabled {:optional true} :boolean]
[:allow-empty {:optional true} [:maybe :boolean]]
[:disabled {:optional true} [:maybe :boolean]]
[:options [:vector {:min 1} schema:radio-button]]
[:on-change {:optional true} fn?]])
@ -85,7 +85,8 @@
(for [[idx {:keys [id class value label icon disabled]}] (d/enumerate options)]
(let [value-str (d/name value)
selected-str (when selected (d/name selected))
checked? (= selected-str value-str)]
checked? (= selected-str value-str)
disabled (d/nilv disabled false)]
[:label {:key idx
:html-for id
:data-label true

View File

@ -255,6 +255,9 @@
(cond
(= attr-group :measure) (select-measure-keys shape)
:else (select-keys shape editable-attrs)))
shape-values (cond-> shape-values
(= attr-group :layer)
(update :hidden #(if (nil? %) false %)))
new-token-acc (merge-token-values token-acc editable-attrs applied-tokens)]
[(conj ids id)
(merge-attrs values shape-values)