From 06b28e2a9c7ac35ea010a14897388086414644dd Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 30 Jun 2026 16:49:37 -0400 Subject: [PATCH] refine: hidden annotations show edit + expand buttons on hover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the unhide button. Instead show Edit (✎) and Expand (⤢) buttons on hover so users can edit for any reason or expand to zoom in. Make title text smaller (10px) and reduce card height to 24px. Co-Authored-By: Claude Haiku 4.5 --- tl/src/tl/views.cljs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tl/src/tl/views.cljs b/tl/src/tl/views.cljs index 4963f56..0edd4c5 100644 --- a/tl/src/tl/views.cljs +++ b/tl/src/tl/views.cljs @@ -799,7 +799,7 @@ (let [grp (get-in scene [:groups (:id a)])] ^{:key (:id a)} (if (:hidden a) - ;; Hidden annotation: small collapsed card + ;; Hidden annotation: small collapsed card with edit/expand on hover (r/with-let [hov? (r/atom false)] [:div.ann {:id (str "ann-" (name (:id a))) :class (when (contains? active-set (:id a)) "active") @@ -807,21 +807,23 @@ {:opacity 0.4 :background "var(--desktop)" :background-size "2px 2px" - :min-height "28px" + :min-height "24px" :display "flex" :align-items "center" :justify-content "space-between" - :padding "2px 8px"}) + :padding "2px 6px"}) :on-mouse-enter #(reset! hov? true) :on-mouse-leave #(reset! hov? false)} - [:span.ann-title {:style {:font-size 12}} + [:span.ann-title {:style {:font-size 10}} [:span.ann-swatch {:style {:background (:color a)}}] (:name a)] (when @hov? - [:button.edit-btn {:title "Unhide" - :on-click #(rf/dispatch [::events/put-group (:id a) - (update grp :meta dissoc :hidden)])} - "Unhide"])]) + [:div {:style {:display "flex" :gap "2px"}} + [:button.expand-btn {:title "Expand" :on-click #(rf/dispatch [::events/expand (:id a)])} + "⤢"] + [:button.edit-btn {:title "Edit" + :on-click #(rf/dispatch [::events/edit-draft (:id a)])} + "✎"]])]) ;; Normal annotation: full card [:div.ann {:id (str "ann-" (name (:id a))) :class (when (contains? active-set (:id a)) "active")