← back to Dw Pairs Well
auto-save: 2026-06-26T08:13:39 (3 files) — server.js tools/grouped-chips-view.png tools/pattern-page-fixed.png
de4b0bca5473e2f2b2cb5f8b0dc96ca3d78ed620 · 2026-06-26 08:13:51 -0700 · Steve Abrams
Files touched
M server.jsA tools/grouped-chips-view.pngA tools/pattern-page-fixed.png
Diff
commit de4b0bca5473e2f2b2cb5f8b0dc96ca3d78ed620
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Fri Jun 26 08:13:51 2026 -0700
auto-save: 2026-06-26T08:13:39 (3 files) — server.js tools/grouped-chips-view.png tools/pattern-page-fixed.png
---
server.js | 17 ++++++++++++++++-
tools/grouped-chips-view.png | Bin 0 -> 4655211 bytes
tools/pattern-page-fixed.png | Bin 0 -> 3241160 bytes
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/server.js b/server.js
index 58550cc..af03800 100644
--- a/server.js
+++ b/server.js
@@ -616,6 +616,16 @@ function hexHue(hex) {
h *= 60; if (h < 0) h += 360;
return h;
}
+// Hue family buckets (degrees) for the "Color" drill-down filter; 'neutral' = grayscale (999).
+const HUE_BUCKETS = {
+ red: [[345,360],[0,15]], orange: [[15,45]], yellow: [[45,70]], green: [[70,165]],
+ teal: [[165,200]], blue: [[200,255]], purple: [[255,290]], pink: [[290,345]],
+ neutral: [[999,999]]
+};
+function hueInBucket(h, name) {
+ const b = HUE_BUCKETS[name]; if (!b) return true;
+ return b.some(function (r) { return h >= r[0] && h <= r[1]; });
+}
// First recognized design-style token from tags → for Style sort; none → 'zzz' (sorts last).
const STYLE_WORDS = ['abstract','animal','botanical','damask','floral','geometric','ikat','moroccan',
'paisley','plaid','scenic','stripe','striped','toile','traditional','trellis','tropical','modern',
@@ -703,7 +713,12 @@ app.get('/api/collection-grouped', async (req, res) => {
if (g.swatches.length < 6 && (row.dominant_hex)) g.swatches.push(row.dominant_hex);
}
- const arr = [...groups.values()];
+ let arr = [...groups.values()];
+ // DRILL-DOWN FILTERS — the "Color" / "Style" chips reveal value sub-chips that filter here.
+ const hueF = String(req.query.hue || '').toLowerCase().slice(0, 16);
+ const styleF = String(req.query.style || '').toLowerCase().slice(0, 24);
+ if (styleF) arr = arr.filter(g => g._style === styleF);
+ if (hueF && HUE_BUCKETS[hueF]) arr = arr.filter(g => hueInBucket(g._hue, hueF));
// SORT the grouped tiles (over the whole set) before paging, so order is stable across pages.
const byPattern = (a, b) => String(a.pattern).localeCompare(String(b.pattern));
const sorters = {
diff --git a/tools/grouped-chips-view.png b/tools/grouped-chips-view.png
new file mode 100644
index 0000000..948fd23
Binary files /dev/null and b/tools/grouped-chips-view.png differ
diff --git a/tools/pattern-page-fixed.png b/tools/pattern-page-fixed.png
new file mode 100644
index 0000000..57e4277
Binary files /dev/null and b/tools/pattern-page-fixed.png differ
← 0fa1972 auto-save: 2026-06-26T07:43:29 (2 files) — tools/grouped-pre
·
back to Dw Pairs Well
·
WS-1: junk-root denylist (SANCAR/INNOVATIONS/TRUE/placeholde 12d6677 →