Преглед на файлове

add tooltip showing full title on history video hover

Titles in the history view are truncated with ellipsis; add a native
title attribute so hovering reveals the full untruncated text.
Brandon Wong преди 1 месец
родител
ревизия
5ca275ba83
променени са 2 файла, в които са добавени 14 реда и са изтрити 1 реда
  1. 13 0
      2026-07-11-claude-history-title-tooltip.md
  2. 1 1
      popup/popup.html

+ 13 - 0
2026-07-11-claude-history-title-tooltip.md

@@ -0,0 +1,13 @@
+# History Title Tooltip
+
+## Request
+
+> in the history view of the popup window, the titles of videos are truncated - that's good. however, when the mouse hovers over them, the full title should appear as a tooltip.
+
+## Changes
+
+- `popup/popup.html`: added `:title="videoHistory.title"` to the `.history-video-title` div (line ~210) alongside the existing `x-text="videoHistory.title"`. Since `videoHistory.title` already holds the untruncated string (truncation is purely visual via `text-overflow: ellipsis` in `popup/popup.css`), binding the native `title` attribute to the same property gives the browser's default tooltip with the full text on hover — no new computed property needed.
+
+## Verification
+
+- Ran the `verify-csp` skill: the new binding is a plain property reference (no expressions, comparisons, or method calls), so it's CSP-compliant. Confirmed the only existing CSP violation in the file (`x-show="videos.length === 0"`, line 195) is pre-existing and unrelated to this change.

+ 1 - 1
popup/popup.html

@@ -207,7 +207,7 @@
           <template x-for="videoHistory in sortedHistory" :key="videoHistory.videoId">
             <div class="history-item" :data-video-id="videoHistory.videoId">
               <div class="history-video-info">
-                <div class="history-video-title" x-text="videoHistory.title"></div>
+                <div class="history-video-title" x-text="videoHistory.title" :title="videoHistory.title"></div>
                 <a
                   class="history-video-id"
                   :href="videoHistory.url"