Dw Hero Admin
repo: ~/Projects/dw-hero-admin · 12 commits · 0 in last 24h, 0 in last 7d ·
Skills used
- /data3
- /brand-assignments3
- /site2
- /brands2
- /favicon1
- /grid1
- /brand1
- /dw-hero-admin1
- /dw-tossed-domains1
Creative ideas + design notes
Commits with substantial prose (≥120 chars) — the rationale behind each move.
b35f88c · 2026-05-30 · fix saveBtn dead-code r.ok check; add backup-file patterns to .gitignore
api() resolves to the JSON body not the Response object, so the else branch
on r.ok was unreachable (HTTP errors already throw). Simplified to always
flash success in .then(). Also added *.bak / *.orig / *.old etc. patterns
to .gitignore to prevent accidental backup-file commits.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a1841b6 · 2026-05-20 · dw-hero-admin: schema-validate /api/site/:site/grid POST (Tier 3 #17)
Added validateGrid() — req.body must be {cells: [4 entries with non-empty http(s) image_url]}. Returns 400 + detail on violation. Closes the hardening gap where a malformed POST would write broken hero-4grid.json that pushToProd() then auto-rsyncs to prod fleet-wide.
74b3917 · 2026-05-14 · feat: per-site fashion-house style guide picker with color dots + theme apply
- Custom dropdown (native <select> can't render color dots): 20 brands from fashion-style-guides/data/brands.json, each option shows name + signature motif + 5 inline color dots
- Server: GET /api/brands (proxies brands.json), GET /api/brand-assignments, POST /api/site/:site/brand
- Assignments persist to ~/Projects/dw-hero-admin/data/brand-assignments.json (per-site → brand_id)
- Apply: admin chrome theme swaps to brand palette via CSS vars (--theme-bg, --theme-panel, --theme-accent, --theme-line) using primary mixed at 92% black for readable dark surface; primary save button takes brand accent
- Brand picker button shows currently-applied brand name + 4 dot preview
- Clear assignment row at bottom of menu reverts to default chrome
- Click-outside closes menu, click on row applies + persists
Verified via Playwright: dropdown renders with dots, click Gucci → theme applies (rgb(1,7,4) bg, #b58a2a accent), persists across page reloads, /api/brand-assignments returns the saved record.
6224e99 · 2026-05-14 · fix(mobile): products grid pushed off-screen below the 2x2 hero editor on narrow viewports
Repro: viewport <=780px. Sidebar (30vh) + topbar + slots-wrap (~448px) + toolbar consumed ~760px of 800px viewport, leaving products grid in a 40px scroll trap inside .products-wrap.
Fix:
- Drop overflow:hidden from .main and overflow-y:auto from .products-wrap on mobile so the whole page scrolls naturally (no nested scroll trap)
- Tighten sidebar to 22vh
- Shrink .slots max-width to 360px on mobile
- Hide the 'crop 12% from top' hint string on mobile (was wrapping the slots-label)
Verified at 600x800 via Playwright: sidebar=176, slots-wrap=332, products-header at y=597 — products visible within first scroll, full page scrolls below.
393ad7b · 2026-05-14 · css: flex-shrink:0 on .topbar and .slots-wrap
Defensive: prevents products-wrap (flex:1, can grow with large product grids) from compressing the topbar or the 2x2 hero editor when the viewport is short or the sidebar stacks above on mobile (<=780px). Surfaced by debate-team-fast review of the screenshot — keep both regions structurally locked above the scrolling product list.
4adc646 · 2026-05-14 · fix(filter): preserve focus on prodFilter — split renderProducts() into renderProductsHeader() + renderProductsGrid()
Old code wiped productsWrap.innerHTML on every keystroke, which destroyed the input the user was typing into and stole focus after each character. Header is now rendered once on site-pick; grid + count update on each filter keystroke, but the input DOM node and its caret are untouched.
File tree
8 files tracked. Click any to browse the source at HEAD.
rendered in 0ms