Project

General

Profile

Actions

Bug #224

closed
ES ES

WEB | Mobile cart scroll and category-scoped occasion filter

Bug #224: WEB | Mobile cart scroll and category-scoped occasion filter

Added by Eugene Suhanov 3 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Target version:
-
Start date:
09/20/2026
Due date:
% Done:

0%

Estimated time:
0:00 h
Spent time:

Description

Two unrelated storefront corrections, split across two branches.

Cart scroll (item 2) — reproduced. cart/index.blade.php:29 puts max-h-[750px] overflow-y-auto on the
item list. At 375×812 with four lines the region measures clientHeight 750 / scrollHeight 767 and spans
y=80→830 — the nested scroller covers the entire viewport below the header. A swipe anywhere over the
cart therefore travels 17px inside the inner region instead of scrolling the page. Lines measure 192px on
seeded data, so the local threshold is 4; production names wrap taller, which is why the report says 3. The
summary block repeats the shape with max-h-[280px].

The header dropdown is not the culprit despite matching the phrase "shopping cart" — app.css:97 sets
.cart-preview__panel { display: none } under @media (hover: none), so it never renders on a phone.

Fix: drop the inner max-h / overflow-y-auto below the existing 900px breakpoint on both regions so the
page scrolls as one document, and drop <x-scroll-hint> with them on mobile. On a phone there is no second
column to keep aligned, so the nested scroller buys nothing and costs the page its natural scroll.
overscroll-behavior: contain was considered and rejected — it stops scroll chaining, which makes the
trap total rather than merely annoying.

Occasion filter (item 3). CatalogController::index() passes $this->options->occasions() straight to
the view — every active occasion, never intersected with the category. Demonstrable on seeded data today:
visible products carry 5 distinct occasions but the filter offers 6, so rande is rendered and matches
nothing, even at category=all
.

Fix: a new memoized CatalogOptions::occasionsForCategory(?string $slug) — one DISTINCT products.occasion
query, intersected with the active occasions list. The intersection is load-bearing, not defensive:
products.occasion is a free-text slug column with no foreign key (see
2024_01_01_000024_normalize_product_occasions.php, which had to slugify it by hand), so the distinct set
can legitimately contain values matching no occasions row. Prune at category=all too — a filter option
that can only ever return nothing is noise everywhere. An occasion that is already selected but absent from
the pruned list still renders, checked, so the customer can see why the grid is empty and clear it; silently
dropping their filter would change the results under them.

This diverges from how empty categories are treated (greyed and inert, not hidden). That is deliberate:
the category pills are a navigational shelf where absence reads as missing stock, whereas the occasion list
is a filter. Not recorded as an ADR — it is a one-line revert.

Branches: fix/mobile-cart-scroll, then feat/category-scoped-occasion-filter

ES Updated by Eugene Suhanov 3 months ago Actions #1

  • Description updated (diff)
  • Estimated time set to 0:00 h

ES Updated by Eugene Suhanov 3 months ago Actions #2

  • Status changed from New to In Progress

ES Updated by Eugene Suhanov 3 months ago Actions #3

  • Status changed from In Progress to Resolved

ES Updated by Eugene Suhanov 2 months ago Actions #4

  • Status changed from Resolved to Resolved Live

SN Updated by Serhii Neliubov about 2 months ago Actions #5

  • Status changed from Resolved Live to Closed
Actions

Also available in: PDF Atom