← back to Rentv Sheet Enrich Refine
Left panel: column controls — '⤢ Fit all' (auto-expand every column to content), '↔ Wider' (+60px each), '↺ Reset' (clear widths+order)
a43fc1d638475c93521bb8d671537f72a6ab8a67 · 2026-08-13 14:50:13 -0700 · Steve Abrams
Files touched
Diff
commit a43fc1d638475c93521bb8d671537f72a6ab8a67
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Thu Aug 13 14:50:13 2026 -0700
Left panel: column controls — '⤢ Fit all' (auto-expand every column to content), '↔ Wider' (+60px each), '↺ Reset' (clear widths+order)
---
public_live/index.html | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/public_live/index.html b/public_live/index.html
index 4d23dbc..62c04d2 100644
--- a/public_live/index.html
+++ b/public_live/index.html
@@ -222,6 +222,7 @@ function buildRail(){
<button id="sortdir" title="asc/desc">${SORT&&SORT.dir<0?'▼':'▲'}</button></div>
<div class="rrow"><label>Group</label><select id="groupsel"><option value="">— none —</option>${opts}</select></div>
<div class="rrow"><label>Density</label><input type="range" id="dens" min="10" max="18" value="${getComputedStyle(document.documentElement).getPropertyValue('--fs').trim().replace('px','')||13}"></div>
+ <div class="rrow"><label>Columns</label><button id="fitcols" title="expand every column to fit its content">⤢ Fit all</button><button id="widecols" title="make all columns wider">↔ Wider</button><button id="resetcols" title="reset widths + order">↺ Reset</button></div>
<details class="sec" open><summary>Fields (${H.filter(Boolean).length}) · <span class="mini" id="allf">all</span> / <span class="mini" id="nonef">none</span></summary>
<div id="ftogs"></div></details>
<details class="sec" open><summary>Filters — click a value</summary><div id="facets"></div></details>`;
@@ -262,6 +263,7 @@ function wireRail(){
$('#sortdir').onclick=()=>{if(SORT){SORT.dir*=-1;LS.set('sort',SORT);$('#sortdir').textContent=SORT.dir<0?'▼':'▲';render()}};
$('#groupsel').onchange=e=>{GROUP=e.target.value;LS.set('group',GROUP);render()};
$('#dens').oninput=e=>{document.documentElement.style.setProperty('--fs',e.target.value+'px')};
+ $('#fitcols').onclick=fitAllCols; $('#widecols').onclick=widenCols; $('#resetcols').onclick=resetLayout;
$('#allf').onclick=()=>{HIDDEN.clear();LS.set('hidden.'+GID,[]);buildRail();render()};
$('#nonef').onclick=()=>{HIDDEN=new Set(DATA.headers.map((h,i)=>h?String(i):null).filter(x=>x));LS.set('hidden.'+GID,[...HIDDEN]);buildRail();render()};
}
@@ -303,6 +305,18 @@ function reorder(from,to){ // shared: move column 'from' to 'to's slot; used b
ORDER=order; LS.set('order.'+GID,ORDER); render(); renderFields(); // sync BOTH views
}
const moveCol=reorder, moveFieldTo=reorder;
+function fitAllCols(){ // expand every visible column to fit its content
+ visCols().forEach(c=>{ let max=String(DATA.headers[c.i]||'').length;
+ document.querySelectorAll(`#grid td[data-c="${c.i}"]`).forEach(td=>{const t=td.textContent||'';if(t.length>max)max=t.length});
+ COLW[c.i]=Math.min(640,Math.max(70,Math.round(max*7.1)+26)); });
+ LS.set('colw.'+GID,COLW); render();
+}
+function widenCols(){ // bump every column wider by 60px
+ visCols().forEach(c=>{ COLW[c.i]=Math.min(700,(COLW[c.i]||180)+60); });
+ LS.set('colw.'+GID,COLW); render();
+}
+function resetLayout(){ COLW={}; ORDER=[]; LS.set('colw.'+GID,{}); LS.set('order.'+GID,[]);
+ ORDER=LS.get('order.'+GID,[]); buildRail(); render(); }
function render(){
const wrap=$('#wrap'); $$('#viewseg button').forEach(b=>b.classList.toggle('on',b.dataset.v===VIEW));
const rows=filtered();
← f54646e Field reorder = drag (removed up/down buttons): left FIELDS
·
back to Rentv Sheet Enrich Refine
·
Smooth column resize: drag a guide line (no per-frame 2500-r 10ea773 →