Skip to content

Feature/store Page Patterns - #102

Merged
jasperf merged 6 commits into
mainfrom
feature/store-page-patterns
Jul 29, 2026
Merged

Feature/store Page Patterns#102
jasperf merged 6 commits into
mainfrom
feature/store-page-patterns

Conversation

@jasperf

@jasperf jasperf commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This release adds four new WooCommerce store page patterns for the demo store subsite, bundling homepage, shop, cart, and checkout layouts as reusable page-composition patterns rather than one-off templates. The patterns follow the theme's Ollie-style composite convention, referencing existing section patterns via block refs rather than hardcoding markup, so the pages stay easy to maintain and override. This work ships as version 4.8.0, with the changelog, style.css, and readme.txt updated in a dedicated version-bump commit following the atomic-commit convention. It also includes two follow-up fixes found while reviewing the new patterns on the store subsite: an add-to-cart button hover state on the category product grid, and a shop-page hero title that showed a generic fallback instead of the shop page's own title. Overall the change is additive: no existing patterns, templates, or theme architecture were modified.

Store Page Patterns:

  • Added patterns/page-store-homepage.php, patterns/page-store-shop.php, patterns/page-store-cart.php, and patterns/page-store-checkout.php, providing full-page compositions for the four core WooCommerce store subsite pages.
  • These patterns are designed for use with the demo rebuild script's page-map workflow, giving the store subsite dedicated, pattern-driven page content instead of relying on generic WooCommerce templates alone.

Version Management:

  • Bumped the theme version to 4.8.0 across style.css and readme.txt's Stable tag, following the project's three-file version convention.
  • Added corresponding CHANGELOG.md entries documenting the new store page patterns and the two fixes below, without bumping the version further for this PR's follow-up work.

Add to Cart Button Hover Fix:

  • The category product grid's add-to-cart button hover state (background-color: var(--wp--preset--color--orange)) went fully transparent — and effectively invisible over the product photo — whenever the active global style variation didn't register --wp--preset--color--orange (that custom property only exists in the "Store" style variation, not the base theme.json). An invalid var() reference falls back to the property's initial value rather than being skipped, so the background silently dropped out.
  • Initially commented the rule out entirely as an interim fix.
  • Replaced that with background-color: var(--wp--preset--color--orange, #E65C00) in assets/styles/block-styles/elayne-category-products.css, adding a hardcoded fallback so the hover state degrades gracefully regardless of which global style variation is active.

Shop Page Hero Title Fix:

  • woo-category-hero.php (used by both archive-product-store.html, the shop page template, and taxonomy-product_cat-store.html, the category archive template) derives its <h1> from get_queried_object(), expecting a WP_Term on category/tag archives. The shop page's queried object is a WP_Post, not a WP_Term, so the hero always fell through to a hardcoded "Collection" fallback there — visible at /store-patterns/shop/.
  • Added an is_shop() branch that prints the shop page's own title (get_the_title( wc_get_page_id( 'shop' ) )) in that case. The WP_Term branch used by category archives is untouched, so taxonomy-product_cat-store.html is unaffected.

Files Changed:

jasperf added 3 commits July 29, 2026 11:58
Add page-level patterns for the WooCommerce store subsite:
- page-store-homepage.php: Combines woo-hero, woo-ticker, woo-shop-categories,
  woo-signature-pieces, woo-our-story, woo-testimonials, and woo-newsletter
- page-store-shop.php: Minimal page with banner header for product catalog
- page-store-cart.php: Full cart page layout
- page-store-checkout.php: Full checkout page layout

These follow the page pattern strategy from ELAYNE-PAGE-PATTERNS-PLAN.md
and match the structure of existing page patterns like page-homepage.php.
- Updated style.css version from 4.7.4 to 4.8.0
- Updated package.json version from 4.7.4 to 4.8.0
- Updated readme.txt Stable tag from 4.7.4 to 4.8.0
- Added 4.8.0 changelog entry to readme.txt with ADDED entries for store page patterns
- Added 4.8.0 changelog entry to CHANGELOG.md with Added section for store page-level patterns
commented out as it made button visibiity zero post hover on actual produc li item & image
@jasperf
jasperf force-pushed the feature/store-page-patterns branch from a10389c to bea52db Compare July 29, 2026 07:34
jasperf added 3 commits July 29, 2026 14:45
The orange background relied on --wp--preset--color--orange, which is only
registered by the Store global style variation. When that variation isn't
active the var() is invalid, background-color falls back to transparent,
and the button disappears over the product image on hover. Add a hardcoded
hex fallback so the hover state degrades gracefully either way.
Show the actual shop page title instead of the WP_Term fallback when
the hero renders on the main shop archive rather than a category term.
@jasperf
jasperf merged commit f9fe214 into main Jul 29, 2026
3 checks passed
@jasperf
jasperf deleted the feature/store-page-patterns branch July 29, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant