ui: unhighlight between marks; translucent clip label

- ::active-annotations no longer falls back to the nearest annotation, so when
  the playhead is outside every mark nothing is highlighted.
- clip label background is translucent (color-mix paper 70%) like the lane
  bars, so the thumbnail reads through while text stays legible.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Your Name 2026-06-30 10:47:33 -04:00
parent d877655b7a
commit 28aa2622f6
2 changed files with 10 additions and 12 deletions

View file

@ -370,13 +370,13 @@ html.dark .timeline-head {
background-size: cover; background-position: center; background-size: cover; background-position: center;
opacity: 1; opacity: 1;
} }
/* a solid label chip pinned top-left — readable over any thumbnail (the old /* a label chip pinned top-left — translucent like the annotation lane bars so
black-text-with-white-halo muddied over busy frames), shrinks to its text so the thumbnail still reads through, but a solid-enough paper wash keeps the
the rest of the thumbnail stays visible. */ text legible (the old black-text-with-white-halo muddied over busy frames). */
.clip-name { .clip-name {
position: absolute; top: 0; left: 0; z-index: 1; max-width: 100%; position: absolute; top: 0; left: 0; z-index: 1; max-width: 100%;
box-sizing: border-box; padding: 0 4px; line-height: 1.5; box-sizing: border-box; padding: 0 4px; line-height: 1.5;
background: var(--paper); color: var(--ink); background: color-mix(in srgb, var(--paper) 70%, transparent); color: var(--ink);
border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
white-space: nowrap; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
text-shadow: none; text-shadow: none;

View file

@ -108,13 +108,11 @@
(first anns))))) (first anns)))))
;; every annotation the playhead is currently inside (overlapping marks ⇒ more ;; every annotation the playhead is currently inside (overlapping marks ⇒ more
;; than one). Falls back to the single ::active-annotation when between marks so ;; than one; none ⇒ empty set, so nothing is highlighted between marks).
;; there's always one highlighted.
(rf/reg-sub (rf/reg-sub
::active-annotations ::active-annotations
:<- [::annotations] :<- [::playhead] :<- [::active-annotation] :<- [::annotations] :<- [::playhead]
(fn [[anns ph fallback] _] (fn [[anns ph] _]
(let [inside (into #{} (keep (fn [a] (when (some (fn [[lo hi]] (<= lo ph hi)) (:bars a)) (into #{} (keep (fn [a] (when (some (fn [[lo hi]] (<= lo ph hi)) (:bars a))
(:id a))) (:id a)))
anns))] anns))))
(if (seq inside) inside (when fallback #{fallback})))))