refactor: split shop_components.ex into 5 focused sub-modules

4,487-line monolith → 23-line facade + 5 modules:
- Base (inputs, buttons, cards)
- Layout (header, footer, mobile nav, shop_layout)
- Cart (drawer, items, order summary)
- Product (cards, gallery, variant selector, hero)
- Content (rich text, images, contact, reviews)

`use SimpleshopThemeWeb.ShopComponents` imports all sub-modules.
No single file over ~1,600 lines now.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-08 14:30:25 +00:00
parent cb4698bec8
commit 3eacd91fda
11 changed files with 4537 additions and 4488 deletions

View File

@@ -208,6 +208,15 @@ Codebase analysis identified ~380 lines of duplication across LiveViews, templat
See: [docs/plans/dry-refactor.md](docs/plans/dry-refactor.md) for full analysis and plan
### Shop Page Integration Tests
**Status:** Follow-up
Home, product detail, and cart pages have no LiveView integration tests. Collection and content pages are well-covered (16 and 10 tests respectively). Priority order by logic complexity:
1. **Product detail page** — variant selection, add-to-cart, gallery, breadcrumb
2. **Cart page** — cart items, quantity changes, order summary, checkout link
3. **Home page** — hero section, featured products, category nav (mostly presentational)
### Page Editor
**Status:** Future (Tier 4)