Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 3.47 KB

File metadata and controls

50 lines (40 loc) · 3.47 KB

Changelog

All notable changes to WM-WP-base-theme are documented here.

[1.0.0] — 2026-04-24

Added

Core Theme

  • Vite 5 build pipeline with manifest-based asset loading and HMR via env vars
  • TypeScript 5 + SCSS with Tailwind CSS 3 utility layer
  • GSAP 3 animation library integrated as a first-class dependency
  • Manifest-keyed transient cache (wm_get_manifest()) for zero-overhead production asset lookups

WordPress Integration

  • theme.json design tokens — 5-color palette, 2 typefaces, 6 font sizes, 6 spacing steps, content/wide layout widths
  • 6 auto-registered block patterns: hero, cards, CTA banner, testimonial, text + image, section divider
  • Custom Post Type and taxonomy helpers (wm_register_cpt() / wm_register_taxonomy()) with array_replace_recursive() overrides
  • ACF Flexible Content field group synced to src/acf-json/ with 4 layouts: hero, text columns, image + text, CTA banner
  • WordPress Customizer panel with brand accent colour (live preview via postMessage), contact info, social links, and footer copyright
  • Helper functions: wm_get_social(), wm_get_contact(), wm_get_footer_text()
  • Schema.org / JSON-LD output on wp_head — WebSite, Organization, BreadcrumbList, Article
  • Native PHP breadcrumbs with Schema.org microdata and configurable separator/class/schema args
  • WooCommerce theme support — disabled default styles, hook-based container injection, template overrides for archive, single, cart, and checkout

Navigation & UI

  • Responsive header with GSAP-animated mobile drawer (slides from x:'100%', 0.35s power3.out)
  • Hamburger → × CSS transition using translateY + rotate on .nav-toggle__bar
  • Focus trap within open drawer; returns focus to trigger on close; Escape, overlay click, and nav link close
  • Skip-to-content link targeting #main-content (WCAG 2.1 SC 2.4.1)
  • Dark mode toggle: prefers-color-scheme on first visit, persisted to localStorage, aria-pressed updated

React Islands

  • wm_render_react_component() PHP helper — renders [data-island] elements with JSON props
  • src/assets/scripts/islands.ts — typed registry (IslandProps, IslandComponent, IslandLoader, IslandRegistry), async dynamic imports, React.createElement() (no unsafe casts)
  • Shadcn-compatible UI components: Button (6 CVA variants), Card suite, Badge (5 variants), Input, Dialog (zero-dependency, Context-based)

Developer Experience

  • bin/setup.sh — interactive project rename (theme name, text domain, package name), copies .env.example, runs npm install && npm run build, prints next steps
  • .wp-env.json — Docker-based local WordPress with PHP 8.2, WP_DEBUG enabled, theme auto-mapped to wp-content/themes/wm-base-theme
  • .env.example documenting VITE_PORT and VITE_HMR_HOST
  • Vitest 4 unit test suite — 18 tests across lib.utils, forms.validation, and dark-mode with jsdom + @testing-library/jest-dom
  • ESLint, Prettier, Stylelint configs; type-check, lint, lint:fix, format scripts

Performance & Accessibility

  • Core Web Vitals defaults: fetchpriority="high" on LCP hero images, loading="lazy" on archive/content images, wm_preconnect_origins filter
  • Form submissions via fetch with AbortController per form, nonce validation guard, aria-live="polite" status regions

Forms

  • src/assets/scripts/components/forms.ts — progressive enhancement, AbortController per form stored in WeakMap, nonce guard, accessible aria-live feedback regions