From d51338e7541621290d73e821d660ee02fbe78492 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 22 Feb 2024 14:46:06 +0100 Subject: [PATCH] :bug: Remove after delay event for not-frame shapes --- .../src/app/common/types/shape/interactions.cljc | 2 +- .../sidebar/options/menus/interactions.cljs | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/common/src/app/common/types/shape/interactions.cljc b/common/src/app/common/types/shape/interactions.cljc index 215ab1aa5..05724ebe8 100644 --- a/common/src/app/common/types/shape/interactions.cljc +++ b/common/src/app/common/types/shape/interactions.cljc @@ -176,7 +176,7 @@ (contains? event-types event-type)) (dm/assert! - "The `:after-delay` event type incompatible with frame shapes" + "The `:after-delay` event type incompatible with not frame shapes" (or (not= event-type :after-delay) (cfh/frame-shape? shape))) diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs index 766a6b3c0..fcef93100 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/interactions.cljs @@ -357,13 +357,14 @@ (update-interaction index #(ctsi/set-offset-effect % value))))) - event-type-options [{:value :click :label (tr "workspace.options.interaction-on-click")} - ;; TODO: need more UX research - ;; :mouse-over (tr "workspace.options.interaction-while-hovering") - ;; :mouse-press (tr "workspace.options.interaction-while-pressing") - {:value :mouse-enter :label (tr "workspace.options.interaction-mouse-enter")} - {:value :mouse-leave :label (tr "workspace.options.interaction-mouse-leave")} - {:value :after-delay :label (tr "workspace.options.interaction-after-delay")}] + event-type-options (-> [{:value :click :label (tr "workspace.options.interaction-on-click")} + ;; TODO: need more UX research + ;; :mouse-over (tr "workspace.options.interaction-while-hovering") + ;; :mouse-press (tr "workspace.options.interaction-while-pressing") + {:value :mouse-enter :label (tr "workspace.options.interaction-mouse-enter")} + {:value :mouse-leave :label (tr "workspace.options.interaction-mouse-leave")}] + (cond-> (cfh/frame-shape? shape) + (conj {:value :after-delay :label (tr "workspace.options.interaction-after-delay")}))) action-type-options [{:value :navigate :label (tr "workspace.options.interaction-navigate-to")} {:value :open-overlay :label (tr "workspace.options.interaction-open-overlay")}