feat(plugins): allow plugin nav items in the sidebar Integrations section (#1767)
* feat(plugins): allow plugin nav items in the sidebar Integrations section Adds "integrations" to the NavItem section contract: plugin-registered nav items with that section render inside the sidebar's Integrations section after the first-party links, gated on the plugins feature flag. The section now also shows when only plugin items exist. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(plugins): don't render an empty header-action slot with zero integration links AppSidebarSection shows its header-action slot whenever headerAction is non-null, regardless of content. IntegrationsSection always passed an IntegrationHeaderShortcuts element, so the plugin-only case (zero configured first-party integrations) rendered an empty slot with a stray 4px margin. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test(plugins): narrow the useFeature mock to the requested flag name Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Kandev Agent <agent@kandev.dev> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,11 @@ fine.
|
||||
// icon: curated icon name (apps/web/lib/plugins/icons.ts — "ticket", "chart",
|
||||
// "robot", "database", ...); unknown/missing names render a puzzle glyph in
|
||||
// the sidebar.
|
||||
interface NavItem { id: string; label: string; path: string; icon?: string; section?: "main" | "settings"; }
|
||||
// section: "main" (default) renders as a top-level sidebar entry;
|
||||
// "integrations" renders inside the sidebar's Integrations section alongside
|
||||
// the first-party integration links (GitHub, Jira, ...). Hosts predating a
|
||||
// section value simply don't render items targeting it (additive change).
|
||||
interface NavItem { id: string; label: string; path: string; icon?: string; section?: "main" | "settings" | "integrations"; }
|
||||
|
||||
// Configuration for the kandev-style title bar the host renders above a plugin
|
||||
// route. All fields optional; defaults are derived (see registerRoute below).
|
||||
|
||||
Reference in New Issue
Block a user