# Admin & page editor UX polish Status: Planned ## Context Full UX audit of the admin panel and page editing experience, evaluating intuitiveness, completeness, and newbie-friendliness. The admin is solid and well-built — good accessibility, clear status indicators, logical flow. The gaps are around preventing data loss, helping newbies understand block types, and tidying up navigation. ## What works well - Dashboard launch checklist with direct links to each setup step - Split-screen page editor with live preview, undo/redo, keyboard shortcuts - ARIA labels on all block controls, live region announcements - Clear dirty state tracking (badge + disabled save button) - Legal page auto-population with "auto-generated" vs "customised" badges - Live editing on shop pages via sidebar with same block card UI - Custom page creation with templates (blank/content/landing) - Shop header shows "Edit page" and "Admin" icons for logged-in admins - Settings page with status pills and helpful setup guidance ## Tasks ### High priority #### 1. Unsaved changes warning **Problem:** No `beforeunload` handler or LiveView navigation guard. Clicking "Pages" breadcrumb or any sidebar link silently discards all unsaved changes. **Fix:** Add a `beforeunload` event listener in the `EditorKeyboard` JS hook that checks `data-dirty`. Also handle LiveView `phx-remove` / navigation events to warn before leaving. **Files:** `assets/js/hooks/editor_keyboard.js`, possibly `lib/berrypod_web/live/admin/pages/editor.ex` **Est:** 30m #### 2. Block descriptions in picker **Problem:** Block picker shows icon + name only. "Info card" vs "Trust badges" vs "Image + text" — a newbie doesn't know what these do or look like. **Fix:** Add a `description` field to each block type in `BlockTypes`. Show it as a subtitle in the picker modal. **Files:** `lib/berrypod/pages/block_types.ex`, `lib/berrypod_web/components/block_editor_components.ex` **Est:** 45m ### Medium priority #### 3. Sidebar nav grouping **Problem:** 12 top-level items in the admin sidebar is too flat. Dashboard, Analytics, Orders, Products, Providers, Pages, Navigation, Media, Theme, Settings, Email, Redirects — a wall of links with no visual hierarchy. **Fix:** Add subtle section headers to group related items: - **Shop** — Dashboard, Analytics, Orders, Products, Providers - **Content** — Pages, Navigation, Media - **Appearance** — Theme - **Settings** — Settings, Email, Redirects Alternatively, nest Email under Settings (it's email *settings*) and move Redirects into a Settings sub-page. That drops to 10 items with clearer grouping. **Files:** `lib/berrypod_web/components/layouts/admin.html.heex`, `assets/css/admin/components.css` **Est:** 45m #### 4. Nav editor input labels **Problem:** Navigation editor shows pairs of text inputs with placeholder text ("Label", "/path") but no visible labels. Accessibility issue and confusing for new users. **Fix:** Add visible `