fix theme data attributes not updating live during editing
All checks were successful
deploy / deploy (push) Successful in 1m26s
All checks were successful
deploy / deploy (push) Successful in 1m26s
The shop_root.html.heex had duplicate .themed element with data-mood etc attributes that were static (rendered once at page load). This prevented live theme changes from visually updating since CSS matched the outer stale element. Fix: Remove data attributes from shop_root.html.heex, keeping only the live-updated .shop-container.themed element inside the LiveView. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -26,7 +26,7 @@ defmodule BerrypodWeb.ThemeCSSConsistencyTest do
|
||||
{:ok, _view, html} = live(log_in_user(conn, user), ~p"/")
|
||||
|
||||
# Verify themed element exists with theme data attributes
|
||||
assert html =~ ~r/<div[^>]*class="themed/
|
||||
assert html =~ ~r/class="[^"]*themed/
|
||||
assert html =~ ~r/data-mood="/
|
||||
assert html =~ ~r/data-typography="/
|
||||
assert html =~ ~r/data-shape="/
|
||||
@@ -39,7 +39,7 @@ defmodule BerrypodWeb.ThemeCSSConsistencyTest do
|
||||
{:ok, _view, html} = live(conn, ~p"/?edit=theme")
|
||||
|
||||
# Verify themed element exists with theme data attributes
|
||||
assert html =~ ~r/<div[^>]*class="themed/
|
||||
assert html =~ ~r/class="[^"]*themed/
|
||||
assert html =~ ~r/data-mood="/
|
||||
assert html =~ ~r/data-typography="/
|
||||
assert html =~ ~r/data-shape="/
|
||||
|
||||
Reference in New Issue
Block a user