# Admin Sidebar Navigation ## Overview The admin sidebar provides navigation across all admin pages. It features collapsible sections with state persistence, active page indicators, and responsive mobile support. **File Location:** `app/templates/admin/partials/sidebar.html` --- ## Sidebar Structure The sidebar is organized into the following sections: | Section | Collapsible | Pages | |---------|-------------|-------| | Dashboard | No | Dashboard | | Platform Administration | Yes | Merchants, Stores, Users, Customers | | Product Catalog | Yes | Marketplace Products, Store Products, Import | | Content Management | Yes | Platform Homepage, Content Pages, Store Themes | | Developer Tools | Yes | Components, Icons | | Platform Health | Yes | Testing Hub, Code Quality, Background Tasks | | Platform Monitoring | Yes | Import Jobs, Application Logs | | Settings | Yes | General, Profile, API Keys, Notifications | --- ## Collapsible Sections ### How It Works Sections can be expanded/collapsed by clicking the section header. The state is persisted to `localStorage` so sections remain open/closed across page navigation and browser sessions. ### State Management **File:** `static/admin/js/init-alpine.js` ```javascript // Default state: Platform Administration open, others closed const defaultSections = { platformAdmin: true, productCatalog: false, contentMgmt: false, devTools: false, platformHealth: false, monitoring: false, settingsSection: false }; // State stored in localStorage under this key const SIDEBAR_STORAGE_KEY = 'admin_sidebar_sections'; ``` ### Available Methods | Method | Description | |--------|-------------| | `toggleSection(section)` | Toggle a section open/closed | | `expandSectionForCurrentPage()` | Auto-expand section containing current page | | `openSections.platformAdmin` | Check if Platform Administration is open | | `openSections.productCatalog` | Check if Product Catalog is open | | `openSections.contentMgmt` | Check if Content Management is open | | `openSections.devTools` | Check if Developer Tools is open | | `openSections.platformHealth` | Check if Platform Health is open | | `openSections.monitoring` | Check if Platform Monitoring is open | | `openSections.settingsSection` | Check if Settings is open | ### CSS Transitions Sections animate smoothly using CSS transitions (no plugins required): ```html