From 8287222b544cc41d4fe8d14b199f33ec4fe7e1f5 Mon Sep 17 00:00:00 2001
From: jamey
Date: Wed, 11 Feb 2026 14:46:12 +0000
Subject: [PATCH] use LiveView navigation and add SVG fallback dimensions to
fix FOUC
All internal links used plain , causing full page reloads
between pages in the same live_session. Changed to <.link navigate>
for client-side navigation across layout, product, cart, base, and
content components.
Added explicit width/height attributes to all SVG icons so they
render at sensible sizes before CSS loads on initial page visit.
Co-Authored-By: Claude Opus 4.6
---
.../page_templates/checkout_success.html.heex | 6 +-
.../components/shop_components/base.ex | 12 +--
.../components/shop_components/cart.ex | 31 +++++--
.../components/shop_components/content.ex | 73 +++++++++------
.../components/shop_components/layout.ex | 82 +++++++++++------
.../components/shop_components/product.ex | 89 ++++++++++++++-----
6 files changed, 195 insertions(+), 98 deletions(-)
diff --git a/lib/simpleshop_theme_web/components/page_templates/checkout_success.html.heex b/lib/simpleshop_theme_web/components/page_templates/checkout_success.html.heex
index 125f108..8225ea5 100644
--- a/lib/simpleshop_theme_web/components/page_templates/checkout_success.html.heex
+++ b/lib/simpleshop_theme_web/components/page_templates/checkout_success.html.heex
@@ -153,11 +153,11 @@
- If this page doesn't update, please contact us.
+ >contact us.
<% end %>
diff --git a/lib/simpleshop_theme_web/components/shop_components/base.ex b/lib/simpleshop_theme_web/components/shop_components/base.ex
index 575a0f5..d22b74e 100644
--- a/lib/simpleshop_theme_web/components/shop_components/base.ex
+++ b/lib/simpleshop_theme_web/components/shop_components/base.ex
@@ -170,13 +170,13 @@ defmodule SimpleshopThemeWeb.ShopComponents.Base do
def shop_link_button(assigns) do
~H"""
-
{render_slot(@inner_block)}
-
+
"""
end
@@ -203,13 +203,13 @@ defmodule SimpleshopThemeWeb.ShopComponents.Base do
def shop_link_outline(assigns) do
~H"""
-
{render_slot(@inner_block)}
-
+
"""
end
diff --git a/lib/simpleshop_theme_web/components/shop_components/cart.ex b/lib/simpleshop_theme_web/components/shop_components/cart.ex
index 936521b..90cd998 100644
--- a/lib/simpleshop_theme_web/components/shop_components/cart.ex
+++ b/lib/simpleshop_theme_web/components/shop_components/cart.ex
@@ -91,7 +91,15 @@ defmodule SimpleshopThemeWeb.ShopComponents.Cart do
phx-click={close_cart_drawer_js()}
aria-label="Close cart"
>
-