[IMP] website_sale_aplicoop: compact mobile layout for the Eskaera shop

Reorder cart/tags/category/search/products into one flex row with
Bootstrap order utilities, so mobile shows cart, tags, category, search,
then products, while desktop keeps its current layout. Product cards
become a two-column grid of compact tiles from the smallest phones, with
a 4:3 photo instead of a tall rectangle. Origin, supplier and tags move
behind a per-product "i" toggle instead of always reserving their own
row, which also drops the now-unused any_product_has_tags plumbing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
GitHub Copilot 2026-08-27 15:24:34 +02:00
parent ef1283be7c
commit 6a59d9f6ad
6 changed files with 217 additions and 152 deletions

View file

@ -890,13 +890,6 @@ class AplicoopWebsiteSale(WebsiteSale):
product_display_info,
filtered_products_dict,
) = self._prepare_products_maps(products, pricelist)
# Whether the tags row needs to be reserved on every card: if nothing in
# this batch has a published tag, the row is skipped entirely instead of
# leaving an empty aria-hidden gap on every product (see product-card.css).
any_product_has_tags = any(
v["published_tags"] for v in filtered_products_dict.values()
)
# Inject draft sale demand context so ribbons/is_out_of_stock use forecasted net qty
products, product_max_qty = self._prepare_draft_stock_data(products)
@ -941,7 +934,6 @@ class AplicoopWebsiteSale(WebsiteSale):
"placed_order_url": placed_order_url,
"products": products,
"filtered_product_tags": filtered_products_dict,
"any_product_has_tags": any_product_has_tags,
"cart": cart,
"available_categories": available_categories,
"category_hierarchy": category_hierarchy,
@ -1053,11 +1045,6 @@ class AplicoopWebsiteSale(WebsiteSale):
"product": product,
"published_tags": published_tags,
}
# See eskaera_shop for why this decides whether to reserve the tags row.
any_product_has_tags = any(
v["published_tags"] for v in filtered_products_dict.values()
)
product_display_info = {}
for product in products_page:
product_display_info[product.id] = self._prepare_product_display_info(
@ -1075,7 +1062,6 @@ class AplicoopWebsiteSale(WebsiteSale):
"group_order": group_order,
"products": products_page,
"filtered_product_tags": filtered_products_dict,
"any_product_has_tags": any_product_has_tags,
"product_supplier_info": product_supplier_info,
"product_price_info": product_price_info,
"product_display_info": product_display_info,
@ -1185,11 +1171,6 @@ class AplicoopWebsiteSale(WebsiteSale):
}
for product in products_page
}
# See eskaera_shop for why this decides whether to reserve the tags row.
any_product_has_tags = any(
v["published_tags"] for v in filtered_products_dict.values()
)
# Inject draft demand context for ribbons/stock flags
products_page, product_max_qty = self._prepare_draft_stock_data(products_page)
@ -1203,7 +1184,6 @@ class AplicoopWebsiteSale(WebsiteSale):
"group_order": group_order,
"products": products_page,
"filtered_product_tags": filtered_products_dict,
"any_product_has_tags": any_product_has_tags,
"product_supplier_info": product_supplier_info,
"product_price_info": product_price_info,
"product_display_info": product_display_info,