🐛 Fix absolute position tooltip message (#6660)

This commit is contained in:
Eva Marco 2025-06-09 09:52:35 +02:00 committed by GitHub
parent d008ea9edd
commit 46ce9500fc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 23 deletions

View file

@ -148,7 +148,7 @@
(ts/dispose! schedule) (ts/dispose! schedule)
(mf/set-ref-val! schedule-ref nil)) (mf/set-ref-val! schedule-ref nil))
(when-let [tooltip (dom/get-element id)] (when-let [tooltip (dom/get-element id)]
(let [trigger-rect (->> (dom/get-current-target event) (let [trigger-rect (->> (dom/get-target event)
(dom/get-bounding-rect))] (dom/get-bounding-rect))]
(mf/set-ref-val! (mf/set-ref-val!
schedule-ref schedule-ref

View file

@ -49,28 +49,27 @@
(mf/defc theme-options (mf/defc theme-options
[{:keys [active-theme-paths themes on-close]}] [{:keys [active-theme-paths themes on-close]}]
(let [] (let [on-edit-click #(modal/show! :tokens/themes {})]
(let [on-edit-click #(modal/show! :tokens/themes {})] [:ul {:class (stl/css :theme-options :custom-select-dropdown)
[:ul {:class (stl/css :theme-options :custom-select-dropdown) :role "listbox"}
:role "listbox"} (for [[group themes] themes]
(for [[group themes] themes] [:li {:key group
[:li {:key group :aria-labelledby (dm/str group "-label")
:aria-labelledby (dm/str group "-label") :role "group"}
:role "group"} (when (seq group)
(when (seq group) [:> text* {:as "span" :typography "headline-small" :class (stl/css :group) :id (dm/str (str/kebab group) "-label") :title group} group])
[:> text* {:as "span" :typography "headline-small" :class (stl/css :group) :id (dm/str (str/kebab group) "-label") :title group} group]) [:& themes-list {:themes themes
[:& themes-list {:themes themes :active-theme-paths active-theme-paths
:active-theme-paths active-theme-paths :on-close on-close
:on-close on-close :grouped? true}]])
:grouped? true}]]) [:li {:class (stl/css :separator)
[:li {:class (stl/css :separator) :aria-hidden true}]
:aria-hidden true}] [:li {:class (stl/css-case :checked-element true
[:li {:class (stl/css-case :checked-element true :checked-element-button true)
:checked-element-button true) :role "option"
:role "option" :on-click on-edit-click}
:on-click on-edit-click} [:> text* {:as "span" :typography "body-small"} (tr "workspace.tokens.edit-themes")]
[:> text* {:as "span" :typography "body-small"} (tr "workspace.tokens.edit-themes")] [:> icon* {:icon-id i/arrow-right :aria-hidden true}]]]))
[:> icon* {:icon-id i/arrow-right :aria-hidden true}]]])))
(mf/defc theme-select (mf/defc theme-select
[{:keys []}] [{:keys []}]