You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: hierarchical plugin admin navigation separate from admin.pages
Problem
EmDash plugins can already expose multiple admin pages through admin.pages, but the admin sidebar renders those pages as a flat list.
For larger plugins, this makes the plugin area hard to scan, especially with numerous plugins. A plugin with pages like Overview, Queue, Settings, Logs, and Diagnostics should ideally appear as one plugin parent with child pages underneath it, rather than several unrelated flat plugin entries.
Today plugin authors have to work around this by building their own internal navigation inside each plugin page. That works, but it duplicates navigation UI and means the main admin sidebar does not reflect the actual plugin page hierarchy.
Proposed API
Keep routable pages and navigation presentation separate:
This would make plugin admin UX scale better without changing the plugin routing model. It also keeps the current API clean: pages says what exists, nav says how it should be presented.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Feature: hierarchical plugin admin navigation separate from admin.pages
Problem
EmDash plugins can already expose multiple admin pages through admin.pages, but the admin sidebar renders those pages as a flat list.
For larger plugins, this makes the plugin area hard to scan, especially with numerous plugins. A plugin with pages like Overview, Queue, Settings, Logs, and Diagnostics should ideally appear as one plugin parent with child pages underneath it, rather than several unrelated flat plugin entries.
Today plugin authors have to work around this by building their own internal navigation inside each plugin page. That works, but it duplicates navigation UI and means the main admin sidebar does not reflect the actual plugin page hierarchy.
Proposed API
Keep routable pages and navigation presentation separate:
interface PluginAdminPage {
path: string;
label: string;
icon?: string;
}
interface PluginAdminNavItem {
path: string;
label: string;
icon?: string;
order?: number;
hidden?: boolean;
children?: PluginAdminNavItem[];
}
interface PluginAdminConfig {
pages?: PluginAdminPage[];
nav?: PluginAdminNavItem[];
widgets?: PluginDashboardWidget[];
}
Example:
admin: {
pages: [
{ path: "/", label: "Overview" },
{ path: "/queue", label: "Queue" },
{ path: "/settings", label: "Settings" },
{ path: "/diagnostics", label: "Diagnostics" },
],
nav: [
{
path: "/",
label: "Translations",
icon: "languages",
children: [
{ path: "/queue", label: "Queue" },
{ path: "/settings", label: "Settings" },
{ path: "/diagnostics", label: "Diagnostics" },
],
},
],
}
Backward compatibility
This can be fully additive:
I would suggest initially supporting only two visible levels:
That keeps the first version simple and avoids turning the sidebar into a sitemap.
Acceptance criteria
Related references (thank you to Codex to unearth all those pages for me)
feat(admin): allow hiding built-in core features from admin sidebar #866
Feature: Collection grouping support for plugin organization #291
feat(core): add group and sortOrder to collections for admin UI organization #292
feat: extensions — custom admin pages with sidebar navigation #572
Bug: Plugin admin React page resolution is brittle for settings routes #281
Plugin settingsSchema does not auto-generate admin settings UI #341
fix: default adminPages and dashboardWidgets to empty arrays in manifest #357
fix(admin): show nav items in mobile sidebar drawer #490
Why this matters
This would make plugin admin UX scale better without changing the plugin routing model. It also keeps the current API clean: pages says what exists, nav says how it should be presented.
Beta Was this translation helpful? Give feedback.
All reactions