All checks were successful
deploy / deploy (push) Successful in 1m27s
Replace individual shop LiveViews with a single Shop.Page that dispatches to page modules based on live_action. This enables patch navigation between pages, preserving socket state (including editor state) across transitions. Changes: - Add Shop.Page unified LiveView with handle_params dispatch - Extract page logic into Shop.Pages.* modules (Home, Product, Collection, etc.) - Update router to use Shop.Page with live_action for all shop routes - Change navigate= to patch= in shop component links - Add maybe_sync_editing_blocks to reload editor state when page changes - Track editor_page_slug to detect cross-page navigation while editing - Fix picture element height when hover image disabled - Extract ThemeEditor components for shared use Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
26 lines
921 B
Elixir
26 lines
921 B
Elixir
defmodule BerrypodWeb.ShopComponents do
|
|
@moduledoc """
|
|
Facade module for shop/storefront UI components.
|
|
|
|
`use BerrypodWeb.ShopComponents` imports all sub-modules:
|
|
|
|
- `Base` — themed inputs, buttons, cards
|
|
- `Layout` — header, footer, mobile nav, shop_layout wrapper
|
|
- `Cart` — cart drawer, cart items, order summary
|
|
- `Product` — product cards, gallery, variant selector, hero sections
|
|
- `Content` — rich text, responsive images, contact form, reviews
|
|
- `ThemeEditor` — shared theme editor components for admin and on-site editing
|
|
"""
|
|
|
|
defmacro __using__(_opts \\ []) do
|
|
quote do
|
|
import BerrypodWeb.ShopComponents.Base
|
|
import BerrypodWeb.ShopComponents.Cart
|
|
import BerrypodWeb.ShopComponents.Content
|
|
import BerrypodWeb.ShopComponents.Layout
|
|
import BerrypodWeb.ShopComponents.Product
|
|
import BerrypodWeb.ShopComponents.ThemeEditor
|
|
end
|
|
end
|
|
end
|