style: MPS-24 — drop redundant tag-detail header from the SERP top
Operator: remove the tag title + '← All products' from the top of the tag SERP. With the always-on chip strip (active category highlighted + an 'All' chip) the tag-detail-header h1/back-link was redundant. - Removed the <section class=tag-detail-header> from shop_tag.j2 and the now-dead section.tag-detail-header CSS rule. - Document <title> (in <head>) still carries the tag name for SEO. - Tests discriminate the tag SERP via tag-detail-content instead of tag-detail-header, and assert the header is gone. 1136 passed. Docs: mps-24.md Phase 2.8j.
This commit is contained in:
parent
09f5a68428
commit
68a1309c83
4 changed files with 20 additions and 12 deletions
|
|
@ -363,6 +363,16 @@ Tests (`test_functional.py::TestProductTagsSpa`):
|
|||
Deferred (occasional click, not the hot path): AJAX-ifying the
|
||||
"Suggest categories" link — still a full navigation by design.
|
||||
|
||||
**Phase 2.8j — drop redundant tag-detail header** (shipped
|
||||
2026-05-16): operator: remove the tag title + "← All products" from
|
||||
the top of the tag SERP. With the always-on chip strip (active
|
||||
category highlighted + an "All" chip) the `tag-detail-header`
|
||||
`<h1>`/back-link was redundant. Removed the section from
|
||||
`shop_tag.j2` and the dead `section.tag-detail-header` CSS. The
|
||||
document `<title>` (in `<head>`) still carries the tag name for SEO.
|
||||
Tests updated to discriminate the tag SERP via `tag-detail-content`
|
||||
instead of `tag-detail-header` (+ assert the header is gone).
|
||||
|
||||
**Phase 2.8i — chip strip on every SERP page** (shipped 2026-05-16):
|
||||
operator: "leave the chits on screen for all serp pages." The
|
||||
horizontal `tag-chip-strip` rendered only on the shop home; drilling
|
||||
|
|
|
|||
|
|
@ -1918,11 +1918,6 @@ div.tag-flash-info {
|
|||
color: var(--color-info-strong, #1e40af);
|
||||
}
|
||||
|
||||
/* Tag detail page header */
|
||||
section.tag-detail-header {
|
||||
margin: var(--space-3, 12px) 0;
|
||||
}
|
||||
|
||||
@media (max-width: 800px) {
|
||||
/* Mobile: chips swipe horizontally; lanes already stack via single-col grid */
|
||||
nav.tag-chip-strip {
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@
|
|||
{% set shop_url = request.shop.absolute_url(request) %}
|
||||
{% set tag_base = request.shop.absolute_url(request, slug=False) %}
|
||||
|
||||
<section class="one-column tag-detail-header">
|
||||
<h1 class="type-headline-3">{{ active_tag.name }}</h1>
|
||||
<p class="type-body-sm"><a href="{{ shop_url }}" class="shop-theme-link-color">← All products</a></p>
|
||||
</section>
|
||||
{# No tag-title / "← All products" header: the chip strip below already
|
||||
shows the active category (highlighted) and an "All" chip, so the
|
||||
header was redundant. (The document <title> in <head> still carries
|
||||
the tag name for SEO.) #}
|
||||
|
||||
{# Chip strip stays on screen on every SERP page so the shopper can
|
||||
hop categories without going back. Same shared macro as the shop
|
||||
|
|
|
|||
|
|
@ -8940,12 +8940,15 @@ class TestHomeLayoutAndTags(_AuthenticatedBase):
|
|||
# switching category preserves sort/price (facet_qs).
|
||||
self.assertIn(f'/s/{shop.id}/tag/math?', res.body.decode())
|
||||
# Following that exact route renders the tag detail SERP page,
|
||||
# which carries the unique .tag-detail-header h1 (the shop home
|
||||
# lanes view never emits that element).
|
||||
# which carries the unique .tag-detail-content layout wrapper
|
||||
# (the shop home lanes view never emits that element). The old
|
||||
# .tag-detail-header h1 / "← All products" was removed —
|
||||
# redundant with the always-on chip strip.
|
||||
res = self.testapp.get(f"/s/{shop.id}/tag/math")
|
||||
body = res.body.decode()
|
||||
self.assertIn('tag-detail-header', body)
|
||||
self.assertIn('tag-detail-content', body)
|
||||
self.assertIn('serp-list', body)
|
||||
self.assertNotIn('tag-detail-header', body)
|
||||
|
||||
def test_chip_strip_stays_on_tag_detail_serp(self):
|
||||
"""Operator: 'leave the chits on screen for all serp pages.'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue