From 7c2aa5e0418648f6982fae7add292baebc5b479f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 25 Jun 2026 18:32:10 -0400 Subject: feat(theme-studio): move reuse context from app labels into a hover Clean the app labels and move the "what reuses this" context into the app dropdown's tooltip, so the labels stay short. The foundational face sets name their consumers on hover: ansi-color (vterm, eshell, compilation, ghostel, eat), shr (eww, nov, mu4e/message), gnus (mu4e article view), and dired (dirvish). Labels now carry only the name plus any acronym expansion. A small APP_HOVERS dict in face_data.py feeds an app "hover" field that sets the dropdown's title on selection. --- scripts/theme-studio/app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts/theme-studio/app.js') diff --git a/scripts/theme-studio/app.js b/scripts/theme-studio/app.js index be9af17f1..2f26e138a 100644 --- a/scripts/theme-studio/app.js +++ b/scripts/theme-studio/app.js @@ -492,11 +492,11 @@ function updateViewLockIndicators(){const s=document.getElementById('viewsel');i for(const o of s.querySelectorAll('option')){const base=o.dataset.label||o.textContent; o.textContent=(areAllLocked(viewLockKeys(o.value),LOCKED)?'🔒 ':'')+base;}} function buildViewSel(){const s=document.getElementById('viewsel');if(!s)return;s.innerHTML=''; - const mk=(v,t)=>{const o=document.createElement('option');o.value=v;o.dataset.label=t;o.textContent=t;return o;}; + const mk=(v,t,ti)=>{const o=document.createElement('option');o.value=v;o.dataset.label=t;o.textContent=t;if(ti)o.title=ti;return o;}; s.appendChild(mk('@code','color/code assignments')); s.appendChild(mk('@ui','ui faces')); const og=document.createElement('optgroup');og.label='package faces'; - for(const app of appViewKeysSorted(APPS))og.appendChild(mk(app,APPS[app].label)); + for(const app of appViewKeysSorted(APPS))og.appendChild(mk(app,APPS[app].label,APPS[app].hover)); s.appendChild(og);updateViewLockIndicators();} // The ‹ › buttons flanking the dropdown step the selection by DIR and re-render // the view (faces table + preview), so you can walk the list without reopening it. @@ -515,6 +515,7 @@ function stepLang(dir){ function onViewChange(){const s=document.getElementById('viewsel');const v=(s&&s.value)||'@code'; const show=(id,on)=>{const e=document.getElementById(id);if(e)e.style.display=on?'':'none';}; show('view-code',v==='@code');show('view-ui',v==='@ui');show('view-pkg',v[0]!=='@'); + if(s)s.title=(v[0]!=='@'&&APPS[v]&&APPS[v].hover)?APPS[v].hover:''; if(v==='@code')renderCode(); else if(v==='@ui'){buildUITable();buildMockFrame();syncPaneHeight('uitable','mockframe');} else pkgChanged();} -- cgit v1.2.3