2 Commits
v0.1.8 ... main

Author SHA1 Message Date
f8394722cc Fix add-to-cart button alignment in product cards (v0.1.10)
All checks were successful
Create Release Package / PHP Lint (push) Successful in 51s
Create Release Package / PHPUnit Tests (push) Successful in 57s
Create Release Package / Build Release (push) Successful in 1m8s
Add mt-auto to card-footer so the button is always pinned to the
bottom of the card, even when the product has no price.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 16:48:46 +02:00
f64e9cd5a2 Make category tree items span full parent width (v0.1.9)
All checks were successful
Create Release Package / PHP Lint (push) Successful in 46s
Create Release Package / PHPUnit Tests (push) Successful in 51s
Create Release Package / Build Release (push) Successful in 1m3s
Move <a> elements to be direct children of the list-group so they
naturally fill the full offcanvas/sidebar width. Chevron toggle moved
inside the link with click interception to prevent navigation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 16:02:13 +02:00
6 changed files with 64 additions and 35 deletions

View File

@@ -2,6 +2,19 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.1.10] - 2026-03-29
### Fixed
- **Add-to-cart button alignment in product cards** (`content-product.html.twig`): Added `mt-auto` to card-footer so the button is always pinned to the bottom of the card, even when the product has no price (e.g., composable products)
## [0.1.9] - 2026-03-29
### Changed
- **Category tree full-width items** (`category-tree-node.html.twig`): Made `<a>` elements direct children of the `list-group` so they span the full parent/offcanvas width; moved chevron toggle inside the link as a `<span>` with click interception
- **Category tree nav wrapper** (`category-tree.html.twig`): Added `w-100` to nav and list-group containers
## [0.1.8] - 2026-03-29 ## [0.1.8] - 2026-03-29
### Changed ### Changed

View File

@@ -345,10 +345,29 @@ The child theme inherits from `wp-bootstrap` via WordPress `Template: wp-bootstr
## Version History ## Version History
Current version: **v0.1.8** Current version: **v0.1.10**
## Session History ## Session History
### 2026-03-29 — v0.1.10 Fix Add-to-Cart Button Alignment
**Scope:** Fixed product card button jumping when price is missing (e.g., composable products).
**Files modified (2):**
- `templates/content-product.html.twig` — Added `mt-auto` to card-footer to pin button to card bottom
- `style.css` — Version bump 0.1.9 → 0.1.10
### 2026-03-29 — v0.1.9 Category Tree Full-Width Items
**Scope:** Made category tree items span the full parent/offcanvas width.
**Files modified (3):**
- `templates/global/category-tree.html.twig` — Added `w-100` to nav and list-group containers
- `templates/global/category-tree-node.html.twig` — Made `<a>` elements direct children of the list-group; moved chevron toggle inside the link as a `<span>` with `event.preventDefault()` click interception
- `style.css` — Version bump 0.1.8 → 0.1.9
### 2026-03-29 — v0.1.8 Restyle Category Tree to Idiomatic Bootstrap ### 2026-03-29 — v0.1.8 Restyle Category Tree to Idiomatic Bootstrap
**Scope:** Restyled the category tree sidebar to use Bootstrap's native `list-group-item-action` pattern with subtler active highlighting. **Scope:** Restyled the category tree sidebar to use Bootstrap's native `list-group-item-action` pattern with subtler active highlighting.

View File

@@ -7,7 +7,7 @@ Description: A Bootstrap 5 child theme for WP Bootstrap that overrides all WooCo
Requires at least: 6.7 Requires at least: 6.7
Tested up to: 6.7 Tested up to: 6.7
Requires PHP: 8.3 Requires PHP: 8.3
Version: 0.1.8 Version: 0.1.10
License: GNU General Public License v2 or later License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: wp-bootstrap Template: wp-bootstrap

View File

@@ -37,7 +37,7 @@
{{ do_action('woocommerce_after_shop_loop_item_title') }} {{ do_action('woocommerce_after_shop_loop_item_title') }}
</div> </div>
<div class="card-footer bg-transparent border-0 pt-0 pb-3 px-3"> <div class="card-footer bg-transparent border-0 pt-0 pb-3 px-3 mt-auto">
{{ do_action('woocommerce_after_shop_loop_item') }} {{ do_action('woocommerce_after_shop_loop_item') }}
</div> </div>
</article> </article>

View File

@@ -2,7 +2,7 @@
# Single Category Tree Node (recursive) # Single Category Tree Node (recursive)
# #
# Renders one category as a list-group-item-action link with optional # Renders one category as a list-group-item-action link with optional
# collapsible nested list for children. Included recursively. # collapsible nested children. Included recursively.
# #
# Expected context: # Expected context:
# node - Category node from wc_bootstrap_get_category_tree() # node - Category node from wc_bootstrap_get_category_tree()
@@ -15,33 +15,30 @@
{% set has_children = node.children is not empty %} {% set has_children = node.children is not empty %}
{% set is_open = node.is_active or node.is_ancestor %} {% set is_open = node.is_active or node.is_ancestor %}
<div class="category-tree-item"> <a href="{{ node.url }}"
<div class="d-flex align-items-center"> class="list-group-item list-group-item-action border-0 py-1 d-flex align-items-center{% if node.is_active %} active{% endif %}"
<a href="{{ node.url }}" style="padding-left: {{ 0.75 + (level - 1) * 1 }}rem;"
class="list-group-item list-group-item-action border-0 py-1 flex-grow-1{% if node.is_active %} active{% endif %}"
style="padding-left: {{ 0.5 + (level - 1) * 1 }}rem;"
{% if node.is_active %}aria-current="page"{% endif %}> {% if node.is_active %}aria-current="page"{% endif %}>
{{ node.name }} <span class="flex-grow-1">{{ node.name }}</span>
<small class="text-body-secondary ms-1">({{ node.count }})</small> <small class="text-body-secondary ms-1">({{ node.count }})</small>
</a>
{% if has_children %} {% if has_children %}
<button class="btn btn-sm btn-link text-body-secondary p-0 px-2 category-tree-toggle" <span class="category-tree-toggle ms-1"
type="button" role="button"
data-bs-toggle="collapse" data-bs-toggle="collapse"
data-bs-target="#cat-{{ node.term_id }}" data-bs-target="#cat-{{ node.term_id }}"
aria-expanded="{{ is_open ? 'true' : 'false' }}" aria-expanded="{{ is_open ? 'true' : 'false' }}"
aria-controls="cat-{{ node.term_id }}" aria-controls="cat-{{ node.term_id }}"
aria-label="{{ __('Toggle subcategories', 'wc-bootstrap') }}"> aria-label="{{ __('Toggle subcategories', 'wc-bootstrap') }}"
onclick="event.preventDefault(); event.stopPropagation();">
<i class="bi bi-chevron-down small" aria-hidden="true"></i> <i class="bi bi-chevron-down small" aria-hidden="true"></i>
</button> </span>
{% endif %} {% endif %}
</div> </a>
{% if has_children %} {% if has_children %}
<div class="collapse{{ is_open ? ' show' : '' }}" id="cat-{{ node.term_id }}"> <div class="collapse{{ is_open ? ' show' : '' }}" id="cat-{{ node.term_id }}">
{% for child in node.children %} {% for child in node.children %}
{% include 'global/category-tree-node.html.twig' with { node: child, level: level + 1 } only %} {% include 'global/category-tree-node.html.twig' with { node: child, level: level + 1 } only %}
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
</div>

View File

@@ -14,14 +14,14 @@
#} #}
{% if categories is not empty %} {% if categories is not empty %}
<nav aria-label="{{ __('Product categories', 'wc-bootstrap') }}"> <nav class="category-tree w-100" aria-label="{{ __('Product categories', 'wc-bootstrap') }}">
<h3 class="sidebar-heading h6 text-uppercase fw-semibold"> <h3 class="sidebar-heading h6 text-uppercase fw-semibold">
{{ __('Categories', 'wc-bootstrap') }} {{ __('Categories', 'wc-bootstrap') }}
</h3> </h3>
<div class="list-group list-group-flush category-tree"> <div class="list-group list-group-flush w-100">
<a href="{{ shop_url }}" <a href="{{ shop_url }}"
class="list-group-item list-group-item-action border-0 px-2 py-1{% if current_cat == 0 %} active{% endif %}"> class="list-group-item list-group-item-action border-0 py-1{% if current_cat == 0 %} active{% endif %}">
{{ __('All products', 'wc-bootstrap') }} {{ __('All products', 'wc-bootstrap') }}
</a> </a>
{% for cat in categories %} {% for cat in categories %}