[object Object]

← back to Wallco Ai

curator A6: 'Copy CSS' button — copies current filter string to clipboard with feedback

ab93f20b8c2270fbbddca0ca41ba777356161a56 · 2026-05-31 22:11:13 -0700 · Steve Abrams

Files touched

Diff

commit ab93f20b8c2270fbbddca0ca41ba777356161a56
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Sun May 31 22:11:13 2026 -0700

    curator A6: 'Copy CSS' button — copies current filter string to clipboard with feedback
---
 YOLO_BACKLOG_2026-05-31.md       | 3 ++-
 public/admin/cactus-curator.html | 9 +++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/YOLO_BACKLOG_2026-05-31.md b/YOLO_BACKLOG_2026-05-31.md
index 1ed01c4..a6f14cb 100644
--- a/YOLO_BACKLOG_2026-05-31.md
+++ b/YOLO_BACKLOG_2026-05-31.md
@@ -20,7 +20,7 @@ Self-contained in `public/admin/cactus-curator.html` — zero `server.js` risk,
 - [x] **A3 · Live before/after chip** — browser-verified (sample #53856; before=none, after=live filter) — — a small sample swatch in the panel showing the current design (or a representative card) with vs without the filter, updating live as sliders move.
 - [x] **A4 · Apply filter to family-stack images** — `--img-adjust` now covers #bbstack img — — the `--img-adjust` filter currently hits `#grid img` + `#modal img`; extend to `#bbstack img` so the by-base colorway stack previews the adjustment too.
 - [x] **A5 · Per-card Bake from grid** — browser-verified (card #53856 bake btn; decide btns still data-a-only; neutral guard fires no-POST) — — a hover "⤓ Bake" affordance on each card that bakes the current adjustment for that design without opening the modal (reuses `bakeAdjustment`).
-- [ ] **A6 · Copy-filter-CSS dev aid** — a tiny "copy CSS" button that copies the current `filter:` string to clipboard (useful for porting the look elsewhere).
+- [x] **A6 · Copy-filter-CSS dev aid** — browser-verified (copies `filter: …;`, ✓ copied feedback) — — a tiny "copy CSS" button that copies the current `filter:` string to clipboard (useful for porting the look elsewhere).
 - [ ] **A7 · Bake confirmation guard** — when baking, if the adjustment is extreme (e.g. saturate >2× or brightness <0.5×), show a one-line "looks extreme — bake anyway?" inline confirm before POSTing, to avoid accidental wild bakes.
 - [ ] **A8 · Reset-all + keyboard** — `0` key (when panel open) resets to neutral; `[`/`]` nudge the focused slider; document in the panel's note line.
 
@@ -40,3 +40,4 @@ TICK · TIMESTAMP · ITEM · STATUS · COMMIT
 - T3 · 2026-05-31 21:14 · A3 before/after chip · done · (commit below)
 - T4 · 2026-05-31 21:15 · A4 family-stack filter · done · (commit below)
 - T5 · 2026-05-31 21:37 · A5 per-card bake · done · (commit below)
+- T6 · 2026-05-31 22:10 · A6 copy-filter-CSS · done · (commit below)
diff --git a/public/admin/cactus-curator.html b/public/admin/cactus-curator.html
index 09bd962..9b43aa5 100644
--- a/public/admin/cactus-curator.html
+++ b/public/admin/cactus-curator.html
@@ -247,6 +247,7 @@
     <button class="adj-preset" data-preset="bw">B&amp;W</button>
   </span>
   <button id="adjReset" class="ctl-btn" title="back to neutral (Hue 127 · Sat 127 · Bri 127 · Con 100)">Reset</button>
+  <button id="adjCopyCss" class="ctl-btn" title="copy the current CSS filter string to the clipboard">⧉ Copy CSS</button>
   <span class="adj-ba" id="adjBA" title="before / after — live preview of the current adjustment on a sample card">
     <span class="ba-wrap"><img class="ba-img ba-before" id="baBefore" alt=""><em>before</em></span>
     <span class="ba-wrap"><img class="ba-img ba-after" id="baAfter" alt=""><em>after</em></span>
@@ -1745,6 +1746,14 @@ load();
     });
     var reset = el('adjReset');
     if (reset) reset.addEventListener('click', function(){ for (var k in NEUTRAL) set(k, NEUTRAL[k]); apply(); markActivePreset(); });
+    // A6 — copy the current CSS filter string to clipboard
+    var copyBtn = el('adjCopyCss');
+    if (copyBtn) copyBtn.addEventListener('click', function(){
+      var css = 'filter: ' + (window.ccAdjust.filterString() || 'none') + ';';
+      var done = function(ok){ var o=copyBtn.textContent; copyBtn.textContent = ok ? '✓ copied' : '✗ copy failed'; setTimeout(function(){ copyBtn.textContent=o; }, 1300); };
+      try { navigator.clipboard.writeText(css).then(function(){ done(true); }, function(){ done(false); }); }
+      catch(e){ done(false); }
+    });
     var panel = el('adjPanel'), toggle = el('adjToggle');
     // A3 — pick a representative card image for the before/after preview chip.
     function refreshBA(){

← cabd7d1 curator A5: per-card 'Bake adjustment' button on grid cards  ·  back to Wallco Ai  ·  curator A7: extreme-adjustment bake guard — require a confir 45280b3 →