wire order pages and theme preview to page renderer, remove old templates
Some checks failed
deploy / deploy (push) Has been cancelled

All 14 pages now render through PageRenderer. Theme editor preview
unified from 10 preview_page clauses to one function + page-context
helpers. PageTemplates module and 10 .heex template files deleted.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-26 19:32:50 +00:00
parent 16ebc29fa9
commit 24ad3b8b60
18 changed files with 79 additions and 743 deletions

View File

@@ -1,6 +1,6 @@
# Page builder plan
Status: In progress (Stage 4 complete)
Status: In progress (Stage 5 complete)
## Context
@@ -651,21 +651,17 @@ Each stage is a commit point. Tests pass, all pages work, nothing is broken. Pic
---
### Stage 5: Wire up order pages + theme preview
### Stage 5: Wire up order pages + theme preview
**Goal:** remaining pages switch over. Theme editor uses PageRenderer. All old page templates are now unused.
**Status:** Complete
- [ ] Update `Shop.CheckoutSuccess``Pages.get_page("checkout_success")`, keep PubSub subscription
- [ ] Update `Shop.Orders``Pages.get_page("orders")`
- [ ] Update `Shop.OrderDetail``Pages.get_page("order_detail")`
- [ ] Update theme editor — replace 10 `preview_page/1` clauses with `Pages.get_page(slug)` + `load_block_data/2` + PageRenderer
- [ ] Verify theme preview still works: page switching, CSS injection, mode: :preview
- [ ] Remove old page templates (the `.heex` files) if no longer referenced
- [ ] Move `layout_assigns/1` and any shared helpers to PageRenderer or a shared module
**Commit:** `wire order pages and theme preview to page renderer, remove old templates`
**Verify:** `mix test` passes, theme editor preview works for all 10 pages, checkout flow works end to end
- [x] Update `Shop.CheckoutSuccess``Pages.get_page("checkout_success")`, keep PubSub subscription
- [x] Update `Shop.Orders``Pages.get_page("orders")`
- [x] Update `Shop.OrderDetail``Pages.get_page("order_detail")`
- [x] Update theme editor — unified `preview_page/1` with `Pages.get_page(slug)` + `load_block_data/2` + PageRenderer (10 clauses → 1 + page-context helpers)
- [x] Removed `PageTemplates` module + 10 `.heex` template files (zero references remain)
- [x] `layout_assigns/1` already lives in `ShopComponents.Layout` — no move needed
- [x] 1284 tests pass, `mix precommit` clean
---