From 7a7b1c164867c60325a8b9644a777e4e5cdf52ce Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 15 Jun 2026 17:30:03 -0500 Subject: refactor(theme-studio): drop the per-row reset column from package faces Package faces was the only tier with a per-row reset button, in its own column. The syntax and ui tiers rely on the bulk reset alone, and the column cost horizontal space the table needs. I removed the per-row cell and its header, so the bulk reset (next to "lock all") is the single reset path now, matching the other tiers. A #viewtest assertion confirms the package rows carry no per-row reset button. The two weren't equivalent: the per-row button reset one face to its default, the bulk reset clears every unlocked face in the app. Losing single-face reset is the accepted tradeoff. --- scripts/theme-studio/app.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'scripts/theme-studio/app.js') diff --git a/scripts/theme-studio/app.js b/scripts/theme-studio/app.js index a9bfd1501..776f2742c 100644 --- a/scripts/theme-studio/app.js +++ b/scripts/theme-studio/app.js @@ -509,7 +509,7 @@ function buildPkgTable(){ const app=curApp(),tb=document.getElementById('pkgbody');if(!tb)return;tb.innerHTML=''; const flt=(document.getElementById('pkgfilter').value||'').trim().toLowerCase(); const inh=[''].concat(BASE_INHERITS).concat(APPS[app].faces.map(r=>r[0])); - for(const [face,label,def] of APPS[app].faces){ + for(const [face,label] of APPS[app].faces){ if(flt&&!(face.toLowerCase().includes(flt)||label.toLowerCase().includes(flt)))continue; const f=PKGMAP[app][face],tr=document.createElement('tr');tr.dataset.face=face; const c0=document.createElement('td');c0.className='cat';c0.textContent=label;c0.title=face;c0.style.cursor='pointer';c0.onclick=()=>flashPkgPreview(face); @@ -524,9 +524,8 @@ function buildPkgTable(){ const ch=document.createElement('td');const hin=document.createElement('input');hin.type='number';hin.min='0.8';hin.max='2.5';hin.step='0.05';hin.value=f.height||1;hin.className='hstep';hin.onchange=()=>{f.height=parseFloat(hin.value)||1;f.source='user';pkgChanged();};ch.appendChild(hin); const cc=document.createElement('td');cc.style.fontSize='10pt';cc.style.whiteSpace='nowrap';const efg=effFg(pkgEffFg(app,face)),ebg=effBg(pkgEffBg(app,face)),r=contrast(efg,ebg);cc.innerHTML=crHtml(r); const cx=document.createElement('td');const boxCtl=mkBoxControl(()=>f.box,b=>{f.box=b;f.source='user';pkgChanged();},{compact:true});cx.appendChild(boxCtl); - const cr=document.createElement('td');const rb=document.createElement('button');rb.className='sbtn';rb.textContent='↺';rb.title='reset to default';rb.onclick=()=>{PKGMAP[app][face]=seedFace(def);pkgChanged();};cr.appendChild(rb); - const cL=mkLockCell('pkg:'+app+':'+face,[fgd,bgd,...pkBtns,isel,hin,boxCtl,rb]); - tr.append(c0,cL,cf,cb,cw,cc,ci,ch,cx,cr);tb.appendChild(tr); + const cL=mkLockCell('pkg:'+app+':'+face,[fgd,bgd,...pkBtns,isel,hin,boxCtl]); + tr.append(c0,cL,cf,cb,cw,cc,ci,ch,cx);tb.appendChild(tr); } applyTableSort('pkgbody'); updateLockToggle('pkg'); -- cgit v1.2.3