implement unified on-site editor phases 1-2
All checks were successful
deploy / deploy (push) Successful in 1m10s

Add theme editing to the existing PageEditorHook, enabling on-site
theme customisation alongside page editing. The editor panel now has
three tabs (Page, Theme, Settings) and can be collapsed while
keeping editing state intact.

- Add theme editing state and event handlers to PageEditorHook
- Add 3-tab UI with tab switching logic
- Add transparent overlay for click-outside dismiss
- Add mobile drag-to-resize with height persistence
- Fix animation replay on drag release (has-dragged class)
- Preserve panel height across LiveView re-renders
- Default to Page tab on editable pages, Theme otherwise
- Show unsaved changes indicator on FAB when panel collapsed
- Fix handle_event grouping warning in admin theme

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-09 09:01:21 +00:00
parent 74ab6411f7
commit 168b6ce76f
10 changed files with 954 additions and 53 deletions

View File

@@ -43,14 +43,14 @@ defmodule BerrypodWeb.PageEditorHookTest do
{:ok, view, _html} = live(conn, "/")
assert has_element?(view, ".editor-panel")
assert has_element?(view, "button", "Edit page")
assert has_element?(view, "button.editor-fab")
end
test "non-admin does not see editor sheet", %{conn: conn} do
{:ok, view, _html} = live(conn, "/")
refute has_element?(view, ".editor-panel")
refute has_element?(view, "button", "Edit page")
refute has_element?(view, "button.editor-fab")
end
end