[object Object]

← back to Vahallan Line Viewer

vahallan-line-viewer: facet values are real <a href> hrefs, not JS-only click (Cody ARGUE fix, TK-10093)

52b42ebc4c187c876d3dd433624799f96d60bddf · 2026-08-01 11:11:34 -0700 · Steve Abrams

Files touched

Diff

commit 52b42ebc4c187c876d3dd433624799f96d60bddf
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sat Aug 1 11:11:34 2026 -0700

    vahallan-line-viewer: facet values are real <a href> hrefs, not JS-only click (Cody ARGUE fix, TK-10093)
---
 public/index.html | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/public/index.html b/public/index.html
index 8dbeef9..c7f1152 100644
--- a/public/index.html
+++ b/public/index.html
@@ -95,9 +95,12 @@ function buildFacets() {
     const div = document.createElement('div'); div.className = 'facet';
     div.innerHTML = `<h3>${label}</h3><table>` +
       Object.entries(counts).sort((a,b)=>b[1]-a[1]).map(([v,n]) =>
-        `<tr data-f="${field}" data-v="${v.replace(/"/g,'&quot;')}"><td>${v}</td><td class="n">${n}</td></tr>`).join('') + '</table>';
+        `<tr data-f="${field}" data-v="${v.replace(/"/g,'&quot;')}"><td><a class="drill" data-filter="${field}" data-v="${v.replace(/"/g,'&quot;')}" href="?${encodeURIComponent(field)}=${encodeURIComponent(v)}">${v}</a></td><td class="n">${n}</td></tr>`).join('') + '</table>';
     div.querySelector('h3').onclick = () => div.classList.toggle('open');
-    div.querySelectorAll('tr').forEach(tr => tr.onclick = () => {
+    div.querySelectorAll('tr').forEach(tr => tr.onclick = (e) => {
+      // facet value is a real href (shareable / new-tab); plain click filters in place
+      if (e && (e.metaKey || e.ctrlKey || e.shiftKey || e.button === 1)) return;
+      if (e) e.preventDefault();
       const f = tr.dataset.f, v = tr.dataset.v;
       if (filters[f] === v) delete filters[f]; else filters[f] = v;
       applyFilters('push');

← ac676e5 vahallan-line-viewer: adopt shared /drill.js href-to-deeper-  ·  back to Vahallan Line Viewer  ·  viewer standard: add Grid/List toggle + per-field on/off men f4fce8e →