move branding settings from Theme tab to Site tab
Some checks failed
deploy / deploy (push) Failing after 10m13s

- Add branding_editor component to site_editor.ex with:
  - Shop name input
  - Show shop name / Show logo toggles
  - Logo upload (size slider, SVG recolor, color picker)
  - Header background toggle and upload (zoom, position sliders)
- Add site_ prefixed event handlers in page_editor_hook.ex:
  - site_update_branding, site_toggle_branding, site_update_color
  - site_remove_logo and site_remove_header (delegate to theme handlers)
- Remove branding sections from theme_editor.ex:
  - Deleted shop_name_input, branding_section, logo/header upload sections
- Theme tab now shows only: preset grid, accent colours, customise accordion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-28 23:40:48 +00:00
parent 7c07805df8
commit 242fed0501
6 changed files with 458 additions and 376 deletions

View File

@@ -213,8 +213,8 @@ end
| 14 | Footer nav: read from database | 13 | 30m | done |
| 15 | Footer content: about, copyright, newsletter toggle | 4 | 45m | done |
| 16 | Footer: read new fields | 15 | 30m | done |
| 17 | Move branding settings from Theme to Site | 4 | 1h | planned |
| 18 | Theme tab: remove branding, polish remaining | 17 | 30m | planned |
| 17 | Move branding settings from Theme to Site | 4 | 1h | done |
| 18 | Theme tab: remove branding, polish remaining | 17 | 30m | done |
| 19 | Merge page settings into Page tab | — | 45m | planned |
| 20 | Remove Settings tab | 19 | 15m | planned |
| 21 | Polish: responsive, empty states, validation | 1-20 | 1.5h | planned |
@@ -300,6 +300,34 @@ Header and footer navigation items are managed through a unified `nav_editor` co
- `lib/berrypod_web/page_editor_hook.ex` - Event handlers, sync functions, dirty state
- `assets/css/admin/components.css` - Styles for nav editor
### Completed: Branding Migration (Tasks 17-18)
Moved branding settings from Theme tab to Site tab.
**What moved:**
- Shop name input
- Show shop name / Show logo toggles
- Logo upload (file picker, size slider, recolor toggle, color picker)
- Header background toggle
- Header image upload (file picker, zoom slider, position sliders)
**Event routing:**
- Site tab branding events use `site_` prefix (e.g., `site_update_branding`, `site_toggle_branding`)
- These route to the same underlying theme state (`theme_editor_settings`, `theme_editor_logo_image`, etc.)
- Logo/header uploads still use `theme_logo_upload` and `theme_header_upload` (shared with theme save flow)
- `site_remove_logo` and `site_remove_header` delegate to theme action handlers
**Files modified:**
- `lib/berrypod_web/page_renderer.ex` - Pass branding props to site_editor
- `lib/berrypod_web/components/shop_components/site_editor.ex` - Add `branding_editor` component with logo/header upload sections
- `lib/berrypod_web/page_editor_hook.ex` - Add `site_update_branding`, `site_toggle_branding`, `site_update_color`, `site_remove_logo`, `site_remove_header` handlers
- `lib/berrypod_web/components/shop_components/theme_editor.ex` - Remove `shop_name_input`, `branding_section`, logo/header upload sections
**Theme tab now contains:**
- Preset grid (8 themes)
- Accent, hover, sale colours
- Customise accordion with typography, colours, layout, shape, products, product page groups
## UI Wireframes
### Site tab layout