From 5e25b5f1045acf1e5faa26c53aa8dcd281b60a02 Mon Sep 17 00:00:00 2001 From: Popov72 Date: Mon, 9 Mar 2026 19:27:48 +0100 Subject: [PATCH 01/30] Add optional component displayed at the right side of the pane header --- .../inspector-v2/src/services/shellService.tsx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/dev/inspector-v2/src/services/shellService.tsx b/packages/dev/inspector-v2/src/services/shellService.tsx index 27de9c888e8..3daa28b0de6 100644 --- a/packages/dev/inspector-v2/src/services/shellService.tsx +++ b/packages/dev/inspector-v2/src/services/shellService.tsx @@ -212,6 +212,12 @@ export type SidePaneDefinition = { * user to lose the complex visual state when switching between tabs. */ keepMounted?: boolean; + + /** + * An optional component to render at the right side of the pane header, between the title and + * the dock menu button. Useful for adding icon-button actions specific to the pane. + */ + headerExtra?: ComponentType; }; type RegisteredSidePane = { @@ -620,7 +626,13 @@ const DockMenu: FunctionComponent< ); }; -const PaneHeader: FunctionComponent<{ id: string; title: string; icon?: ComponentType; dockOptions: Map void> }> = (props) => { +const PaneHeader: FunctionComponent<{ + id: string; + title: string; + icon?: ComponentType; + headerExtra?: ComponentType; + dockOptions: Map void>; +}> = (props) => { const { id, title, dockOptions } = props; const classes = useStyles(); @@ -633,6 +645,7 @@ const PaneHeader: FunctionComponent<{ id: string; title: string; icon?: Componen )} {title} + {props.headerExtra && } + + + + + + +
+
+ + +
+
+
+ {schemeNames.length === 0 && No naming schemes defined.} + {schemeNames.map((name) => { + const count = manager.getNamingScheme(name)?.length ?? 0; + return ( +
+ {name} + + {count} bone{count !== 1 ? "s" : ""} + +
+ ); + })} +
+ {editing && ( +
+ {editing.originalName ? `Editing "${editing.originalName}"` : "New Scheme"} +
+ + setEditing({ ...editing, name: d.value })} /> +
+
+ +