Wire up remaining placeholder settings, implement menu search (v2.4.0)

- Custom dashboard, Modern plugins page, and Modern comments page
  toggles previously had no effect at all — their respective takeovers/
  redirects (DashboardTakeover, SubApps' Plugins/Comments handling,
  MenuSerializer's link rewrites) ran unconditionally regardless of the
  setting. All three now default to their previous always-on behavior
  but can actually be turned off.
- Menu search had zero implementation. Sidebar.vue now shows a real
  search box (gated on the setting) that filters both the WP-native menu
  and the Aurora nav section by title, auto-expanding matching sections.
- Removed "Modern posts table" and "Modern users page" toggles (and
  their now-empty Posts/Users settings categories) — both described a
  custom management page that was never built. A checkbox with nothing
  behind it is worse than no checkbox.

Verified all four live: dashboard/plugins/comments toggles correctly
flip between the Aurora and native experience and back; menu search
filters correctly and clears back to the full menu.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
nixpanel
2026-07-04 09:35:00 -05:00
co-authored by Claude Sonnet 5
parent 1578481106
commit fb93888d3f
8 changed files with 129 additions and 40 deletions
+24
View File
@@ -5,6 +5,30 @@ 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.4.0] - 2026-07-04
### Added
- Settings > Menu's "Menu search" toggle now actually does something —
previously had no implementation at all. Shows a real search box at the
top of the sidebar that filters both the WP-native menu list and the
Aurora nav section by title, auto-expanding every section with a match.
### Fixed
- Settings > Dashboard's "Custom dashboard" toggle now actually gates the
dashboard takeover — previously the Aurora dashboard always replaced the
native one regardless of this setting, with no way to turn it back off.
- Settings > Plugins' "Modern plugins page" and Settings > Comments'
"Modern comments page" toggles now actually gate their respective
takeovers/redirects the same way — previously both ran unconditionally
regardless of these settings.
### Removed
- Settings > Posts' "Modern posts table" and Settings > Users' "Modern
users page" toggles — both described a custom management interface that
was never built. Shipping a checkbox with nothing behind it is worse
than not having the checkbox; removed rather than left as dead UI. Their
categories are removed too, since they had no other fields.
## [2.3.1] - 2026-07-04
### Fixed
+7
View File
@@ -27,6 +27,13 @@ class DashboardTakeover
public static function is_dashboard()
{
// Settings > Dashboard > "Custom dashboard" — previously always on
// regardless of this setting; default true so existing installs keep
// their current behavior until explicitly turned off.
if (!Settings::get("use_custom_dashboard", true)) {
return false;
}
return isset($GLOBALS["pagenow"]) && $GLOBALS["pagenow"] === "index.php";
}
+8
View File
@@ -3,6 +3,7 @@ namespace AuroraAdmin\Pages;
use AuroraAdmin\Utility\Assets;
use AuroraAdmin\Licensing\License;
use AuroraAdmin\Options\Settings;
defined("ABSPATH") || exit();
@@ -111,6 +112,13 @@ class SubApps
{
global $pagenow;
// Settings > Comments > "Modern comments page" — previously always
// redirected regardless of this setting; default true so existing
// installs keep their current behavior until explicitly turned off.
if (!Settings::get("modern_comments", true)) {
return;
}
if ($pagenow !== "edit-comments.php" || !current_user_can("edit_posts")) {
return;
}
+7 -2
View File
@@ -1,6 +1,8 @@
<?php
namespace AuroraAdmin\Shell;
use AuroraAdmin\Options\Settings;
defined("ABSPATH") || exit();
/**
@@ -142,11 +144,14 @@ class MenuSerializer
return "";
}
if ($slug === "plugins.php") {
// Both checks default to true so existing installs keep their current
// behavior (previously always on regardless of these settings) until
// explicitly turned off in Settings > Plugins / Settings > Comments.
if ($slug === "plugins.php" && Settings::get("modern_plugins", true)) {
return admin_url("plugins.php?page=aurora-admin-plugins");
}
if ($slug === "edit-comments.php") {
if ($slug === "edit-comments.php" && Settings::get("modern_comments", true)) {
return admin_url("admin.php?page=aurora-admin-comments");
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "aurora-admin-app",
"version": "2.3.1",
"version": "2.4.0",
"private": true,
"type": "module",
"scripts": {
-28
View File
@@ -152,20 +152,6 @@ export const settingsCategories = [
},
],
},
{
id: 'posts',
title: 'Posts',
subtitle: 'Post management and display preferences',
icon: 'dashicons-admin-post',
fields: [
{
key: 'modern_posts',
type: 'toggle',
label: 'Modern posts table',
description: 'Use the Aurora posts management interface.',
},
],
},
{
id: 'plugins',
title: 'Plugins',
@@ -230,20 +216,6 @@ export const settingsCategories = [
},
],
},
{
id: 'users',
title: 'Users',
subtitle: 'User management and administration settings',
icon: 'dashicons-admin-users',
fields: [
{
key: 'modern_users',
type: 'toggle',
label: 'Modern users page',
description: 'Use the Aurora users management interface.',
},
],
},
{
id: 'comments',
title: 'Comments',
+80 -7
View File
@@ -86,13 +86,13 @@ const openId = ref(
: null)
);
const isExpanded = (item) => openId.value === item.id;
const isExpanded = (item) => isSearching.value || openId.value === item.id;
const toggle = (item) => {
openId.value = openId.value === item.id ? null : item.id;
};
const auroraExpanded = computed(() => openId.value === AURORA_ID);
const auroraExpanded = computed(() => isSearching.value || openId.value === AURORA_ID);
const toggleAuroraNav = () => {
openId.value = auroraExpanded.value ? null : AURORA_ID;
// Only Aurora's own expand state needs to persist across page loads —
@@ -101,6 +101,34 @@ const toggleAuroraNav = () => {
localStorage.setItem('aurora-nav-expanded', auroraExpanded.value ? '1' : '0');
};
const isAuroraActive = (item) => normalize(item.url) === current.value;
// Settings > Menu > "Show a search box at the top of the admin menu" —
// filters both the WP-native menu list and the Aurora nav section by
// title (own item or any submenu item), auto-expanding every section with
// a match so results are visible without also having to click into them.
const showMenuSearch = computed(() => !!props.serverData?.settings?.menu_search);
const searchQuery = ref('');
const isSearching = computed(() => searchQuery.value.trim() !== '');
const matchesQuery = (text) =>
(text || '').toLowerCase().includes(searchQuery.value.trim().toLowerCase());
const filteredMenu = computed(() => {
if (!isSearching.value) return props.menu;
return props.menu
.filter((item) => !item.separator)
.map((item) => {
const titleMatch = matchesQuery(item.title);
const matchingSubs = (item.submenu || []).filter((sub) => matchesQuery(sub.title));
if (!titleMatch && !matchingSubs.length) return null;
return titleMatch ? item : { ...item, submenu: matchingSubs };
})
.filter(Boolean);
});
const filteredAuroraNav = computed(() => {
if (!isSearching.value) return props.auroraNav;
return props.auroraNav.filter((item) => matchesQuery(item.title));
});
</script>
<template>
@@ -111,8 +139,13 @@ const isAuroraActive = (item) => normalize(item.url) === current.value;
<template v-else>{{ collapsed ? 'A' : 'Aurora' }}</template>
</div>
<div v-if="showMenuSearch && !collapsed" class="sidebar__menu-search">
<span class="dashicons dashicons-search" />
<input v-model="searchQuery" type="text" placeholder="Search menu…" />
</div>
<ul class="sidebar__list">
<template v-for="(item, index) in menu" :key="item.id || index">
<template v-for="(item, index) in filteredMenu" :key="item.id || index">
<li v-if="item.separator" class="sidebar__separator" />
<li v-else class="sidebar__item">
@@ -139,7 +172,7 @@ const isAuroraActive = (item) => normalize(item.url) === current.value;
<span v-if="item.count" class="sidebar__count">{{ item.count }}</span>
</a>
<button
v-if="item.submenu && item.submenu.length"
v-if="item.submenu && item.submenu.length && !isSearching"
type="button"
class="sidebar__chevron"
:class="{ 'sidebar__chevron--open': isExpanded(item) }"
@@ -173,9 +206,13 @@ const isAuroraActive = (item) => normalize(item.url) === current.value;
</template>
</ul>
<div v-if="auroraNav.length" class="sidebar__separator" />
<p v-if="isSearching && !filteredMenu.length && !filteredAuroraNav.length" class="sidebar__no-results">
No matching menu items.
</p>
<div v-if="auroraNav.length" class="sidebar__aurora">
<div v-if="filteredAuroraNav.length" class="sidebar__separator" />
<div v-if="filteredAuroraNav.length" class="sidebar__aurora">
<div class="sidebar__row sidebar__aurora-brand" @click="toggleAuroraNav">
<a href="#" class="sidebar__link" @click.prevent :title="collapsed ? 'Aurora' : null">
<span class="sidebar__icon">
@@ -184,6 +221,7 @@ const isAuroraActive = (item) => normalize(item.url) === current.value;
<span class="sidebar__title">Aurora</span>
</a>
<button
v-if="!isSearching"
type="button"
class="sidebar__chevron"
:class="{ 'sidebar__chevron--open': auroraExpanded }"
@@ -194,7 +232,7 @@ const isAuroraActive = (item) => normalize(item.url) === current.value;
</div>
<ul v-if="auroraExpanded" class="sidebar__sublist">
<li v-for="item in auroraNav" :key="item.id" class="sidebar__subitem">
<li v-for="item in filteredAuroraNav" :key="item.id" class="sidebar__subitem">
<a
:href="item.url"
class="sidebar__sublink"
@@ -265,6 +303,41 @@ const isAuroraActive = (item) => normalize(item.url) === current.value;
object-fit: contain;
}
.sidebar__menu-search {
display: flex;
align-items: center;
gap: 8px;
margin: 0 12px 10px;
padding: 6px 10px;
border-radius: 8px;
background: var(--aurora-bg-subtle);
color: var(--aurora-text-muted);
}
.sidebar__menu-search .dashicons {
font-size: 15px;
width: 15px;
height: 15px;
flex-shrink: 0;
}
.sidebar__menu-search input {
flex: 1;
min-width: 0;
border: none;
background: none;
outline: none;
color: var(--aurora-text);
font-size: 0.8125rem;
}
.sidebar__menu-search input::placeholder {
color: var(--aurora-text-muted);
}
.sidebar__no-results {
margin: 4px 16px;
font-size: 0.8125rem;
color: var(--aurora-text-muted);
}
.sidebar__list,
.sidebar__sublist {
list-style: none;
+2 -2
View File
@@ -3,7 +3,7 @@
* Plugin Name: Aurora Admin
* Plugin URI: https://aurora.co
* Description: A modern, fast WordPress admin interface.
* Version: 2.3.1
* Version: 2.4.0
* Author: Aurora
* Text Domain: aurora-admin
* Domain Path: /languages/
@@ -14,7 +14,7 @@
defined("ABSPATH") || exit();
define("AURORA_ADMIN_VERSION", "2.3.1");
define("AURORA_ADMIN_VERSION", "2.4.0");
define("AURORA_ADMIN_PATH", plugin_dir_path(__FILE__));
define("AURORA_ADMIN_URL", plugins_url("aurora-admin/"));