fix content image double-suffix, clean up page defaults and editor UX
All checks were successful
deploy / deploy (push) Successful in 1m22s

- Fix resolve_content_image returning base path (not full URL) so
  responsive_image doesn't double-append width/extension
- Remove legacy image fields (image_src, image_alt, image_url) from
  block settings schemas
- Remove demo/mockup fallbacks from renderer and defaults — blank
  fields stay blank instead of showing preview content
- Replace demo text in defaults with instructional placeholders that
  guide new shop owners
- Remove redundant X button from editor sidebar, add unsaved-changes
  confirmation to Done button
- Fix block card name overflow on mobile (display: block, flex-wrap)
- Add onboarding UX improvement plan (10 tasks)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-03 00:56:01 +00:00
parent 61772c26ae
commit 8ea77e5992
11 changed files with 189 additions and 80 deletions

View File

@@ -11,6 +11,6 @@ defmodule BerrypodWeb.PageControllerTest do
test "GET / renders the shop home page", %{conn: conn} do
conn = get(conn, ~p"/")
assert html_response(conn, 200) =~ "Original designs, printed on demand"
assert html_response(conn, 200) =~ "Your headline goes here"
end
end

View File

@@ -14,14 +14,14 @@ defmodule BerrypodWeb.Shop.ContentTest do
test "renders about page", %{conn: conn} do
{:ok, _view, html} = live(conn, ~p"/about")
assert html =~ "About the studio"
assert html =~ "sample about page"
assert html =~ "About us"
assert html =~ "Tell your customers who you are"
end
test "displays about image", %{conn: conn} do
test "displays about content body", %{conn: conn} do
{:ok, _view, html} = live(conn, ~p"/about")
assert html =~ "night-sky-blanket"
assert html =~ "placeholder text"
end
end

View File

@@ -30,7 +30,7 @@ defmodule BerrypodWeb.Shop.HomeTest do
test "renders the home page", %{conn: conn} do
{:ok, _view, html} = live(conn, ~p"/")
assert html =~ "Original designs, printed on demand"
assert html =~ "Your headline goes here"
end
test "renders hero section with CTA", %{conn: conn} do
@@ -55,8 +55,8 @@ defmodule BerrypodWeb.Shop.HomeTest do
test "renders image and text section", %{conn: conn} do
{:ok, _view, html} = live(conn, ~p"/")
assert html =~ "Made with passion, printed with care"
assert html =~ "Learn more about the studio"
assert html =~ "Your story in a nutshell"
assert html =~ "Read more about us"
end
test "renders header with shop name", %{conn: conn} do

View File

@@ -90,10 +90,8 @@ defmodule BerrypodWeb.PageEditorHookTest do
"button[phx-click='editor_toggle_sidebar'][aria-label='Show editor sidebar']"
)
# Close the sidebar via the X button
view
|> element("button[phx-click='editor_toggle_sidebar'][aria-label='Close sidebar']")
|> render_click()
# Close the sidebar via the backdrop
view |> element(".page-editor-backdrop") |> render_click()
assert has_element?(view, "[data-sidebar-open='false']")
# Pencil button appears in header to re-open

View File

@@ -49,17 +49,17 @@ defmodule BerrypodWeb.PageRendererTest do
test "home page renders hero and featured products" do
html = render_page("home", %{products: []})
assert html =~ "Original designs, printed on demand"
assert html =~ "Your headline goes here"
assert html =~ "Shop the collection"
assert html =~ "Featured products"
assert html =~ "Made with passion, printed with care"
assert html =~ "Your story in a nutshell"
end
test "about page renders hero and content area" do
html =
render_page("about", %{content_blocks: [%{type: :paragraph, text: "Test about text"}]})
assert html =~ "About the studio"
assert html =~ "About us"
assert html =~ "content-body"
end