migrate admin forms to inline feedback
All checks were successful
deploy / deploy (push) Successful in 1m26s

Replace put_flash calls with inline feedback for form saves:
- Email settings: "Now send a test email" after saving
- Settings: from address and signing secret saves
- Page editor: save button shows "Saved" checkmark

Inline feedback appears next to save buttons and auto-clears after
3 seconds. Banners (put_flash) remain for page-level outcomes like
deletions, state changes, and async operations.

Task 3 of notification overhaul. Theme editor skipped as it auto-saves.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-07 21:01:54 +00:00
parent bd07c9c7d9
commit 42542ac177
7 changed files with 56 additions and 13 deletions

View File

@@ -113,7 +113,7 @@ defmodule BerrypodWeb.Admin.SettingsTest do
})
|> render_submit()
assert html =~ "Webhook signing secret saved"
assert has_element?(view, ".admin-inline-feedback-saved")
assert html =~ "whsec_te•••456"
end
@@ -261,7 +261,7 @@ defmodule BerrypodWeb.Admin.SettingsTest do
|> form("form[phx-submit=\"save_from_address\"]", %{from_address: "shop@example.com"})
|> render_submit()
assert html =~ "From address saved"
assert has_element?(view, ".admin-inline-feedback-saved")
assert Settings.get_setting("email_from_address") == "shop@example.com"
end
end