From bcd8c2471b0c71d9fd2c8c37d51d545c07543774 Mon Sep 17 00:00:00 2001 From: "russell@unturf.com" Date: Sat, 16 May 2026 11:02:30 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20MPS-24=20=E2=80=94=20top=20chips=20navig?= =?UTF-8?q?ate=20to=20the=20tag=20SERP=20like=20the=20left=20nav?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Operator: the top chips should do what the new left-nav category links do (navigate to the per-tag SERP rendered in the shop's configured home_layout), not the in-place 'default cards' hide/show. Root cause: tag_filter.js decided whether to intercept by checking chips[0].href for '/tag/'. chips[0] is the 'All' chip, which points at the shop home (shop_url, no '/tag/'), so the category chips' real {tag_base}/tag/{slug} hrefs were never detected → tag_filter.js always intercepted → in-place card filter. Now scan ALL chips: if any links to /tag/, bail and let full navigation happen, so a chip behaves exactly like its matching left-nav category link. JS-only defect fix; tag_filter.js is ?v={{ request.git_hash }} cache-busted. --- make_post_sell/static/js/tag_filter.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/make_post_sell/static/js/tag_filter.js b/make_post_sell/static/js/tag_filter.js index 4d5a657..4b896c3 100644 --- a/make_post_sell/static/js/tag_filter.js +++ b/make_post_sell/static/js/tag_filter.js @@ -25,11 +25,17 @@ return; } - // If chips link to /tag/ (tag detail page), keep full navigation — - // the server already filters; in-place filter would be wrong context. - const firstChip = chips[0]; - const href = firstChip.getAttribute("href") || ""; - if (href.indexOf("/tag/") !== -1) { + // If the category chips link to /tag/ (the tag-detail SERP), + // keep full navigation so a chip behaves EXACTLY like the matching + // left-nav category link — the server renders that page in the + // shop's configured home_layout, instead of an in-place "default + // cards" hide/show. NOTE: chips[0] is the "All" chip, which points + // at the shop home (no /tag/), so deciding from chips[0] alone + // wrongly kept the in-place filter — scan ALL chips. + const navigatesToSerp = Array.prototype.some.call(chips, function (c) { + return (c.getAttribute("href") || "").indexOf("/tag/") !== -1; + }); + if (navigatesToSerp) { return; }