diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ac3f74..6e4ab58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ version bump. Starts at 2.1.0 — earlier history (the theming rebuild, window chrome/taskbar, Site Editor support, etc.) lives in `git log` and `PROJECT_STATUS.md`, not reconstructed here. +## [2.3.1] - 2026-07-04 + +### Fixed +- Sidebar accordion now treats the "Aurora" branded nav section as part of + the same single-open accordion as the WP-native menu list, instead of + being the one exception that stayed open regardless of what else was + expanded. Expanding any native section now collapses Aurora too, and + vice versa. + ## [2.3.0] - 2026-07-04 ### Added diff --git a/app/package.json b/app/package.json index af69ba1..e968818 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "aurora-admin-app", - "version": "2.3.0", + "version": "2.3.1", "private": true, "type": "module", "scripts": { diff --git a/app/src/shell/components/Sidebar.vue b/app/src/shell/components/Sidebar.vue index bef170b..addcd8c 100644 --- a/app/src/shell/components/Sidebar.vue +++ b/app/src/shell/components/Sidebar.vue @@ -63,11 +63,28 @@ const isSectionActive = (item) => { return (item.submenu || []).some((sub) => normalize(sub.url) === current.value); }; -// Accordion: only one section's submenu open at a time, so expanding one -// closes the rest instead of the list growing indefinitely. Starts on -// whichever section is active (each nav is a full page load in this -// multi-page admin, so there's no need to react to URL changes afterward). -const openId = ref(props.menu.find((item) => isSectionActive(item))?.id ?? null); +// Accordion: only one section's submenu open at a time — the WP-native +// menu list and the Aurora branded section below it are one shared +// accordion, not two independent ones, so expanding either closes +// whichever else was open (including Aurora, previously the one +// exception). AURORA_ID is a sentinel alongside the real native-menu item +// ids, since Aurora's own nav isn't one of the `menu` array's entries. +const AURORA_ID = '__aurora__'; + +const isAuroraSectionActive = () => + props.auroraNav.some((item) => normalize(item.url) === current.value); + +// Starts on whichever section is active (each nav is a full page load in +// this multi-page admin, so there's no need to react to URL changes +// afterward); falls back to Aurora expanded (its long-standing default) +// unless the user previously collapsed it, matching the old per-browser +// localStorage preference. +const openId = ref( + props.menu.find((item) => isSectionActive(item))?.id ?? + (isAuroraSectionActive() || localStorage.getItem('aurora-nav-expanded') !== '0' + ? AURORA_ID + : null) +); const isExpanded = (item) => openId.value === item.id; @@ -75,13 +92,12 @@ const toggle = (item) => { openId.value = openId.value === item.id ? null : item.id; }; -// Aurora's own branded nav section (Settings, Menu Creator, Admin Notices, -// Role Editor, Activity Log, Database Explorer) — separate from the -// WP-native menu list above it. Expanded by default; per-browser preference -// kept in localStorage, same pattern as the main collapsed-menu state. -const auroraExpanded = ref(localStorage.getItem('aurora-nav-expanded') !== '0'); +const auroraExpanded = computed(() => openId.value === AURORA_ID); const toggleAuroraNav = () => { - auroraExpanded.value = !auroraExpanded.value; + openId.value = auroraExpanded.value ? null : AURORA_ID; + // Only Aurora's own expand state needs to persist across page loads — + // native sections already resolve their open/closed state from whether + // they're active on the current page. localStorage.setItem('aurora-nav-expanded', auroraExpanded.value ? '1' : '0'); }; const isAuroraActive = (item) => normalize(item.url) === current.value; diff --git a/aurora-admin.php b/aurora-admin.php index 3999172..4d66a2a 100644 --- a/aurora-admin.php +++ b/aurora-admin.php @@ -3,7 +3,7 @@ * Plugin Name: Aurora Admin * Plugin URI: https://aurora.co * Description: A modern, fast WordPress admin interface. - * Version: 2.3.0 + * Version: 2.3.1 * Author: Aurora * Text Domain: aurora-admin * Domain Path: /languages/ @@ -14,7 +14,7 @@ defined("ABSPATH") || exit(); -define("AURORA_ADMIN_VERSION", "2.3.0"); +define("AURORA_ADMIN_VERSION", "2.3.1"); define("AURORA_ADMIN_PATH", plugin_dir_path(__FILE__)); define("AURORA_ADMIN_URL", plugins_url("aurora-admin/"));