From c972c06142b2467fa344cef42fea136b00d9e7ca Mon Sep 17 00:00:00 2001 From: Alonso Torres Date: Tue, 24 Feb 2026 14:41:35 +0100 Subject: [PATCH 1/6] :bug: Fix problem with export dialog on single board (#8426) --- exporter/src/app/browser.cljs | 14 ++++++++------ exporter/src/app/handlers/export_shapes.cljs | 7 ++++--- frontend/src/app/main/data/exports/assets.cljs | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/exporter/src/app/browser.cljs b/exporter/src/app/browser.cljs index 526ae77380..0da27c2609 100644 --- a/exporter/src/app/browser.cljs +++ b/exporter/src/app/browser.cljs @@ -100,12 +100,14 @@ (def browser-pool-factory (letfn [(create [] - (p/let [opts #js {:args #js ["--allow-insecure-localhost" "--font-render-hinting=none"]} - browser (.launch pw/chromium opts) - id (swap! pool-browser-id inc)] - (l/info :origin "factory" :action "create" :browser-id id) - (unchecked-set browser "__id" id) - browser)) + (-> (p/let [opts #js {:args #js ["--allow-insecure-localhost" "--font-render-hinting=none"]} + browser (.launch pw/chromium opts) + id (swap! pool-browser-id inc)] + (l/info :origin "factory" :action "create" :browser-id id) + (unchecked-set browser "__id" id) + browser) + (p/catch (fn [cause] + (l/error :hint "Cannot launch the headless browser" :cause cause))))) (destroy [obj] (let [id (unchecked-get obj "__id")] diff --git a/exporter/src/app/handlers/export_shapes.cljs b/exporter/src/app/handlers/export_shapes.cljs index 29a92df61e..49913fd011 100644 --- a/exporter/src/app/handlers/export_shapes.cljs +++ b/exporter/src/app/handlers/export_shapes.cljs @@ -47,12 +47,13 @@ (s/def ::params (s/keys :req-un [::exports ::profile-id] - :opt-un [::wait ::name ::skip-children])) + :opt-un [::wait ::name ::skip-children ::force-multiple])) (defn handler - [{:keys [:request/auth-token] :as exchange} {:keys [exports] :as params}] + [{:keys [:request/auth-token] :as exchange} {:keys [exports force-multiple] :as params}] (let [exports (prepare-exports exports auth-token)] - (if (and (= 1 (count exports)) + (if (and (not force-multiple) + (= 1 (count exports)) (= 1 (count (-> exports first :objects)))) (handle-single-export exchange (-> params (assoc :export (first exports)) diff --git a/frontend/src/app/main/data/exports/assets.cljs b/frontend/src/app/main/data/exports/assets.cljs index 4355ad7ef9..f2c8315a90 100644 --- a/frontend/src/app/main/data/exports/assets.cljs +++ b/frontend/src/app/main/data/exports/assets.cljs @@ -195,7 +195,7 @@ params {:exports exports :cmd cmd :profile-id profile-id - :wait false} + :force-multiple true} progress-stream (->> (ws/get-rcv-stream ws-conn) From b4c279ad7b11225bba54f510ccdfff837653f487 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 24 Feb 2026 14:29:51 +0100 Subject: [PATCH 2/6] :lipstick: Add minor cosmetic refactor on how plugin flags are stored The main idea behind this, is move all plugin related stuff from app.main.data.plugins into app.plugins.* and make them more consistent. Also the intention that put all plugins related state under specific prefix on the state. --- frontend/src/app/main/data/plugins.cljs | 19 ++--------- .../app/main/data/workspace/transforms.cljs | 3 +- frontend/src/app/plugins/flags.cljs | 32 ++++++++++++++----- frontend/src/app/plugins/flex.cljs | 3 +- frontend/src/app/plugins/shape.cljs | 8 +++-- frontend/src/app/plugins/state.cljs | 16 ---------- 6 files changed, 35 insertions(+), 46 deletions(-) delete mode 100644 frontend/src/app/plugins/state.cljs diff --git a/frontend/src/app/main/data/plugins.cljs b/frontend/src/app/main/data/plugins.cljs index 5bdcdb776e..e9f5266c1b 100644 --- a/frontend/src/app/main/data/plugins.cljs +++ b/frontend/src/app/main/data/plugins.cljs @@ -14,6 +14,7 @@ [app.main.data.modal :as modal] [app.main.data.notifications :as ntf] [app.main.store :as st] + [app.plugins.flags :as pflag] [app.plugins.register :as preg] [app.util.globals :as ug] [app.util.http :as http] @@ -44,20 +45,6 @@ (update [_ state] (update-in state [:workspace-local :open-plugins] (fnil conj #{}) id)))) -(defn reset-plugin-flags - [id] - (ptk/reify ::reset-plugin-flags - ptk/UpdateEvent - (update [_ state] - (update-in state [:workspace-local :plugin-flags] assoc id {})))) - -(defn set-plugin-flag - [id key value] - (ptk/reify ::set-plugin-flag - ptk/UpdateEvent - (update [_ state] - (update-in state [:workspace-local :plugin-flags id] assoc key value)))) - (defn remove-current-plugin [id] (ptk/reify ::remove-current-plugin @@ -68,8 +55,8 @@ (defn- load-plugin! [{:keys [plugin-id name description host code icon permissions]}] (try - (st/emit! (save-current-plugin plugin-id) - (reset-plugin-flags plugin-id)) + (st/emit! (pflag/clear plugin-id) + (save-current-plugin plugin-id)) (.ɵloadPlugin ^js ug/global diff --git a/frontend/src/app/main/data/workspace/transforms.cljs b/frontend/src/app/main/data/workspace/transforms.cljs index e7d958462c..706a7577a8 100644 --- a/frontend/src/app/main/data/workspace/transforms.cljs +++ b/frontend/src/app/main/data/workspace/transforms.cljs @@ -1173,7 +1173,8 @@ (when add-component-to-variant? (rx/of (ev/event {::ev/name "add-component-to-variant"}))) (when add-new-variant? - (rx/of (ev/event {::ev/name "add-new-variant" ::ev/origin "workspace:move-shapes-to-frame"})))))))) + (rx/of (ev/event {::ev/name "add-new-variant" + ::ev/origin "workspace:move-shapes-to-frame"})))))))) (defn- get-displacement "Retrieve the correct displacement delta point for the diff --git a/frontend/src/app/plugins/flags.cljs b/frontend/src/app/plugins/flags.cljs index 0e8a10a5da..a9f1a6dce7 100644 --- a/frontend/src/app/plugins/flags.cljs +++ b/frontend/src/app/plugins/flags.cljs @@ -6,10 +6,30 @@ (ns app.plugins.flags (:require - [app.main.data.plugins :as dp] + [app.common.data.macros :as dm] [app.main.store :as st] [app.plugins.utils :as u] - [app.util.object :as obj])) + [app.util.object :as obj] + [potok.v2.core :as ptk])) + +(defn natural-child-ordering? + [plugin-id] + (boolean + (dm/get-in @st/state [:plugins :flags plugin-id :natural-child-ordering]))) + +(defn clear + [id] + (ptk/reify ::reset + ptk/UpdateEvent + (update [_ state] + (update-in state [:plugins :flags] assoc id {})))) + +(defn- set-flag + [id key value] + (ptk/reify ::set-flag + ptk/UpdateEvent + (update [_ state] + (update-in state [:plugins :flags id] assoc key value)))) (defn flags-proxy [plugin-id] @@ -17,11 +37,7 @@ :naturalChildOrdering {:this false :get - (fn [] - (boolean - (get-in - @st/state - [:workspace-local :plugin-flags plugin-id :natural-child-ordering]))) + (fn [] (natural-child-ordering? plugin-id)) :set (fn [value] @@ -30,4 +46,4 @@ (u/display-not-valid :naturalChildOrdering value) :else - (st/emit! (dp/set-plugin-flag plugin-id :natural-child-ordering value))))})) + (st/emit! (set-flag plugin-id :natural-child-ordering value))))})) diff --git a/frontend/src/app/plugins/flex.cljs b/frontend/src/app/plugins/flex.cljs index 8f52299bd7..8e41288576 100644 --- a/frontend/src/app/plugins/flex.cljs +++ b/frontend/src/app/plugins/flex.cljs @@ -259,11 +259,10 @@ (u/display-not-valid :appendChild child) :else - (let [child-id (obj/get child "$id")] + (let [child-id (obj/get child "$id")] (st/emit! (dwt/move-shapes-to-frame #{child-id} id nil nil) (ptk/data-event :layout/update {:ids [id]}))))))) - (defn layout-child-proxy? [p] (obj/type-of? p "LayoutChildProxy")) diff --git a/frontend/src/app/plugins/shape.cljs b/frontend/src/app/plugins/shape.cljs index c409df8b16..5b434e9ceb 100644 --- a/frontend/src/app/plugins/shape.cljs +++ b/frontend/src/app/plugins/shape.cljs @@ -47,13 +47,13 @@ [app.main.data.workspace.variants :as dwv] [app.main.repo :as rp] [app.main.store :as st] + [app.plugins.flags :refer [natural-child-ordering?]] [app.plugins.flex :as flex] [app.plugins.format :as format] [app.plugins.grid :as grid] [app.plugins.parser :as parser] [app.plugins.register :as r] [app.plugins.ruler-guides :as rg] - [app.plugins.state :refer [natural-child-ordering?]] [app.plugins.text :as text] [app.plugins.utils :as u] [app.util.http :as http] @@ -960,9 +960,11 @@ (u/display-not-valid :appendChild "Plugin doesn't have 'content:write' permission") :else - (let [child-id (obj/get child "$id") + (let [child-id (obj/get child "$id") is-reversed? (ctl/flex-layout? shape) - index (if (and (natural-child-ordering? plugin-id) is-reversed?) 0 (count (:shapes shape)))] + index (if (and (natural-child-ordering? plugin-id) is-reversed?) + 0 + (count (:shapes shape)))] (st/emit! (dwsh/relocate-shapes #{child-id} id index)))))) :insertChild diff --git a/frontend/src/app/plugins/state.cljs b/frontend/src/app/plugins/state.cljs deleted file mode 100644 index 25c931571f..0000000000 --- a/frontend/src/app/plugins/state.cljs +++ /dev/null @@ -1,16 +0,0 @@ -;; This Source Code Form is subject to the terms of the Mozilla Public -;; License, v. 2.0. If a copy of the MPL was not distributed with this -;; file, You can obtain one at http://mozilla.org/MPL/2.0/. -;; -;; Copyright (c) KALEIDOS INC - -(ns app.plugins.state - (:require - [app.main.store :as st])) - -(defn natural-child-ordering? - [plugin-id] - (boolean - (get-in - @st/state - [:workspace-local :plugin-flags plugin-id :natural-child-ordering]))) From e2377e8fa805f61e1d827ec28c59fd9c0c742b11 Mon Sep 17 00:00:00 2001 From: Eva Marco Date: Mon, 16 Feb 2026 11:07:39 +0100 Subject: [PATCH 3/6] :bug: Fix input width on composite token form --- .../src/app/main/ui/ds/controls/utilities/input_field.cljs | 1 + .../src/app/main/ui/ds/controls/utilities/input_field.scss | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/frontend/src/app/main/ui/ds/controls/utilities/input_field.cljs b/frontend/src/app/main/ui/ds/controls/utilities/input_field.cljs index 53ffe32317..56ceedc848 100644 --- a/frontend/src/app/main/ui/ds/controls/utilities/input_field.cljs +++ b/frontend/src/app/main/ui/ds/controls/utilities/input_field.cljs @@ -84,6 +84,7 @@ :on-click on-icon-click}]) (if aria-label [:> tooltip* {:content aria-label + :class (stl/css :tooltip-wrapper) :id tooltip-id} [:> "input" props]] [:> "input" props]) diff --git a/frontend/src/app/main/ui/ds/controls/utilities/input_field.scss b/frontend/src/app/main/ui/ds/controls/utilities/input_field.scss index a141bb3914..80068f0c2b 100644 --- a/frontend/src/app/main/ui/ds/controls/utilities/input_field.scss +++ b/frontend/src/app/main/ui/ds/controls/utilities/input_field.scss @@ -120,3 +120,7 @@ color: var(--color-foreground-secondary); min-inline-size: var(--sp-l); } + +.tooltip-wrapper { + inline-size: 100%; +} From 72a855d4ac3f2d464955cd66970081310834930b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Wed, 18 Feb 2026 11:17:05 +0100 Subject: [PATCH 4/6] :bug: Fix activeSets in themes API --- frontend/src/app/plugins/tokens.cljs | 12 +++++++++++- .../poc-tokens-plugin/src/app/app.component.html | 7 ++++++- .../apps/poc-tokens-plugin/src/app/app.component.ts | 1 + plugins/apps/poc-tokens-plugin/src/plugin.ts | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/plugins/tokens.cljs b/frontend/src/app/plugins/tokens.cljs index dd4c18c592..f22c1fa128 100644 --- a/frontend/src/app/plugins/tokens.cljs +++ b/frontend/src/app/plugins/tokens.cljs @@ -354,7 +354,17 @@ (st/emit! (dwtl/toggle-token-theme-active id))) :activeSets - {:this true :get (fn [_])} + {:this true + :get (fn [_] + (let [tokens-lib (u/locate-tokens-lib file-id) + theme (u/locate-token-theme file-id id)] + (->> theme + :sets + (map #(->> % + (ctob/get-set-by-name tokens-lib) + (ctob/get-id) + (token-set-proxy plugin-id file-id))) + (apply array))))} :addSet {:enumerable false diff --git a/plugins/apps/poc-tokens-plugin/src/app/app.component.html b/plugins/apps/poc-tokens-plugin/src/app/app.component.html index f5ef5ff940..2f7e188259 100644 --- a/plugins/apps/poc-tokens-plugin/src/app/app.component.html +++ b/plugins/apps/poc-tokens-plugin/src/app/app.component.html @@ -18,7 +18,12 @@
    @for (theme of themes; track theme.id) {
  • - {{ theme.group }} / {{ theme.name }} + + @if (theme.group) { + {{ theme.group }} / + } + {{ theme.name }} +