diff --git a/PROGRESS.md b/PROGRESS.md index 3ae926d..ef50973 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -26,16 +26,16 @@ Tier 1 MVP complete. Tier 2 production readiness complete (except Litestream and - Complete SEO (OG/Twitter cards, JSON-LD, sitemap, canonical URLs, meta descriptions) - Email settings admin with 10 adapter options and test email - No-JS support across all key flows -- Fully Tailwind-free CSS (9.8 KB gzipped shop, 17.8 KB gzipped admin) +- Fully Tailwind-free CSS (12 KB gzipped shop+theme, 95 KB gzipped admin total) - CI pipeline (compile warnings, format, credo, dialyzer, tests) - Deployed on Fly.io with observability (LiveDashboard, ErrorTracker, structured logging) - 1679+ tests passing, 99-100 PageSpeed mobile ## Next up -### Admin CSS refactor ([plan](docs/plans/css-migration.md)) +### Admin CSS refactor ([plan](docs/plans/css-migration.md)) — Complete -Phase 2 in progress — replacing Tailwind utility clones with semantic CSS classes. Layout shell, core components, and 6 page templates refactored (newsletter, settings, providers, theme, order_show). 11 templates still use utility classes; `utilities.css` stays until they're done. Visual regression fixes applied (5 missing line-height/padding corrections). Phases 1 (layer cascade) and 4 (delete utilities.css) blocked until all templates are migrated. +All 4 phases done. Tailwind utility clone deleted, all templates migrated to semantic classes, layout primitives added, `@layer` cascade in place. Post-refactor cleanup: dead CSS removal (9 classes), color-mix token extraction (5 `--admin-text-*` tokens replacing 80 inline calls), and theme CSS extracted into standalone `theme.css` bundle shared across all page types (eliminates 28 KB duplication). Image optimizer hardened against tiny placeholder stubs. Theme editor mobile overlay bug fixed. ### Profit-aware pricing & sales ([plan](docs/plans/profit-aware-pricing.md)) diff --git a/assets/css/shop/components.css b/assets/css/shop/components.css index 1af420c..50da86f 100644 --- a/assets/css/shop/components.css +++ b/assets/css/shop/components.css @@ -2947,19 +2947,19 @@ background-color: var(--t-surface-sunken); color: var(--t-text-secondary); - &--lg { + &.order-status-badge-lg { font-size: var(--t-text-small, 0.875rem); padding: 0.375rem 0.875rem; margin-top: 0.75rem; } - &--shipped, - &--delivered { + &.order-status-badge-shipped, + &.order-status-badge-delivered { background-color: color-mix(in srgb, var(--t-accent) 15%, transparent); color: var(--t-accent); } - &--failed { + &.order-status-badge-failed { background-color: color-mix(in srgb, #ef4444 12%, transparent); color: #b91c1c; } diff --git a/docs/plans/css-migration.md b/docs/plans/css-migration.md index c80db3d..41928d6 100644 --- a/docs/plans/css-migration.md +++ b/docs/plans/css-migration.md @@ -1,6 +1,6 @@ # Plan: CSS migration — Tailwind + DaisyUI to modern hand-written CSS -Status: Complete (all phases 0-8). Admin CSS semantic refactor in progress — see PROGRESS.md. +Status: Complete. All phases done including admin semantic refactor, dead CSS cleanup, color-mix token extraction, and theme CSS bundle extraction. ## Overview diff --git a/lib/berrypod_web/page_renderer.ex b/lib/berrypod_web/page_renderer.ex index febb5ee..bdd01f9 100644 --- a/lib/berrypod_web/page_renderer.ex +++ b/lib/berrypod_web/page_renderer.ex @@ -819,7 +819,7 @@ defmodule BerrypodWeb.PageRenderer do {Calendar.strftime(order.inserted_at, "%-d %B %Y")}

- + {format_order_status(order.fulfilment_status)} @@ -856,7 +856,7 @@ defmodule BerrypodWeb.PageRenderer do <.link navigate="/orders" class="order-detail-back">← Back to orders

{assigns[:order].order_number}

{Calendar.strftime(assigns[:order].inserted_at, "%-d %B %Y")}

- + {format_order_status(assigns[:order].fulfilment_status)} diff --git a/test/berrypod/theme/preview_data_test.exs b/test/berrypod/theme/preview_data_test.exs index a4697d8..6752bd0 100644 --- a/test/berrypod/theme/preview_data_test.exs +++ b/test/berrypod/theme/preview_data_test.exs @@ -76,7 +76,7 @@ defmodule Berrypod.Theme.PreviewDataTest do cart_items = PreviewData.cart_items() assert is_list(cart_items) - assert cart_items != [] + assert length(cart_items) > 0 end test "each cart item has required fields" do @@ -116,7 +116,7 @@ defmodule Berrypod.Theme.PreviewDataTest do testimonials = PreviewData.testimonials() assert is_list(testimonials) - assert testimonials != [] + assert length(testimonials) > 0 end test "each testimonial has required fields" do