add link picker and validation to navigation editor
All checks were successful
deploy / deploy (push) Successful in 1m26s

- replace freeform inputs with grouped dropdown (pages, custom pages,
  collections, external URL)
- add inline URL validation for external links
- add inline feedback component instead of flash messages
- add dismiss-on-interaction pattern (feedback clears on changes)
- add no-JS fallback via NavigationController
- add DirtyGuard hook to warn before navigating away with unsaved changes
- add no-JS fallbacks for settings forms (from address, signing secret)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-08 02:10:06 +00:00
parent 42542ac177
commit 3e29a89fff
10 changed files with 551 additions and 204 deletions

View File

@@ -384,8 +384,6 @@ defmodule BerrypodWeb.Admin.Pages.Editor do
case Pages.save_page(slug, %{title: page_data.title, blocks: blocks}) do
{:ok, _page} ->
Process.send_after(self(), :clear_save_status, 3000)
{:noreply,
socket
|> assign(:dirty, false)
@@ -523,11 +521,6 @@ defmodule BerrypodWeb.Admin.Pages.Editor do
# ── Handle info ──────────────────────────────────────────────────
@impl true
def handle_info(:clear_save_status, socket) do
{:noreply, assign(socket, :save_status, :idle)}
end
# ── Render ───────────────────────────────────────────────────────
@impl true
@@ -857,6 +850,7 @@ defmodule BerrypodWeb.Admin.Pages.Editor do
|> assign(:history, history)
|> assign(:future, [])
|> assign(:dirty, true)
|> assign(:save_status, :idle)
|> assign(:live_region_message, message)
end
end