Skip to content

v0.8.0-alpha — polish pass: theming foundation, admin clarity, pagination

Pre-release
Pre-release

Choose a tag to compare

@Shepdesign Shepdesign released this 24 May 21:27
· 57 commits to main since this release

Six commits' worth of design-system foundation, admin polish, and a new pagination facet. No DB changes; safe to deploy in place.

Highlights

New: pagination facet

Drop [hof_facet name="pages"] (or the Gutenberg block) into your sidebar/footer for a numbered « 1 2 3 … 12 » nav with iOS-17 pill chrome. Server-rendered for SEO + no-JS fallback; JS upgrades clicks to pushState + refresh so the result region swaps in place without a full page reload. All ?hof[*] filters survive pagination. Configurable from the editor: per-page override, neighbors visible (0–5), first/last + prev/next toggles.

New: design system foundation

50 new --hof-* CSS variable tokens across every facet — brand colors, radius scale (xs / sm / md / lg / xl / pill), font sizes, focus rings (hard + soft), shared input/label/count/option chrome, named shadow scale. Per-facet specifics filled in where the shared tokens can't cover it.

// Override the brand color and every facet picks it up:
add_filter( 'hof_public_css_tokens', function ( $t ) {
    $t['--hof-primary']   = '#0ea5e9';
    $t['--hof-radius-md'] = '12px';
    return $t;
} );

Cascade bug fixed: hof_public_css_tokens was effectively dead before this release because the inline <style> block fired at wp_head:5, before the bundled stylesheet enqueued at :8. The bundle's defaults silently overrode any filter value for any token the bundle defined (which was most of them). Now bound at :20, so filter overrides actually win. If you've been wondering why your filter overrides "didn't do anything" — they should start working after this upgrade.

Admin polish

  • Editor preview no longer blows up at narrow widths. Container queries replaced the 960px media query that fired at the wrong moment (the editor sits inside a 240px facet list inside a 168px nav inside WP admin's own sidebar — viewport-only queries couldn't see the actual cramped space). Preview now clamp(240px, 32cqi, 320px) and collapses to single-column at 640px container width.
  • Display picker reorganized: options grouped by what shoppers do (Select / Range / Boolean / Text / Visual / Navigation / Display-only) instead of one flat list.
  • Three relabels for clarity (internal slugs unchanged — stored configs keep working):
    • AskNatural-language search
    • Visual DNAColor match (drop an image)
    • View (no source)Display-only (no filter)
  • Swatch tiles get a hover/focus tooltip showing full term + count. Crucial for the long-tail end where tiles shrink to 36px and the label below truncates.

Removed: 2D slider

The 2D slider display landed as a visual skeleton (ca9831a) and a resize-handle iteration (b28468b), then got shelved during the natural-language search pivot. Never reached working interactive filtering. Removed entirely — public/src/two-d-slider.js (229 lines) + ~125 CSS rules + the Renderer method + admin editor refs + REST/validation entries. Saved configs that pointed at two_d_slider don't crash — they fall through to checkbox via Renderer's default arm.

Upgrade

git pull && composer install && npm install

No DB changes. No reindex needed. Build the bundle after deploy: npm run build.

Honest gaps

Three places that still need human eyes — all called out in their respective commits:

  1. Visual diff against pre-0.8 not done. CSS bundle's defaults claim to be byte-identical to before but only the test gates verify code correctness, not pixel correctness.
  2. Pagination renderer has no automated tests (depends on $wp_query global + WP function helpers that aren't worth the Brain Monkey setup for a UI component).
  3. Sidebar widgets that render before the main query may see $wp_query->found_posts as 0 and silently render no pagination. Acceptable for v1.