Add node description tooltips in the Properties panel and on secondary inputs in the graph (#2590)

Add tooltips to secondary inputs in graph/Properties panel, and to nodes in Properties panel
This commit is contained in:
Keavon Chambers
2025-04-17 00:59:46 -07:00
committed by GitHub
parent ab39f3f837
commit eca5d0d105
15 changed files with 434 additions and 283 deletions
+6 -4
View File
@@ -110,12 +110,9 @@ export class UpdateNodeGraphTransform extends JsMessage {
readonly transform!: NodeGraphTransform;
}
const InputTypeDescriptions = Transform(({ obj }) => new Map(obj.inputTypeDescriptions));
const NodeDescriptions = Transform(({ obj }) => new Map(obj.nodeDescriptions));
export class SendUIMetadata extends JsMessage {
@InputTypeDescriptions
readonly inputTypeDescriptions!: Map<string, string>;
@NodeDescriptions
readonly nodeDescriptions!: Map<string, string>;
@Type(() => FrontendNode)
@@ -220,6 +217,8 @@ export class FrontendGraphInput {
readonly name!: string;
readonly description!: string;
readonly resolvedType!: string | undefined;
readonly validTypes!: string[];
@@ -251,6 +250,8 @@ export class FrontendGraphOutput {
readonly name!: string;
readonly description!: string;
readonly resolvedType!: string | undefined;
@CreateInputConnectorArray
@@ -1508,7 +1509,7 @@ export function isWidgetTable(layoutTable: LayoutGroup): layoutTable is WidgetTa
return Boolean((layoutTable as WidgetTable)?.tableWidgets);
}
export type WidgetSection = { name: string; visible: boolean; pinned: boolean; id: bigint; layout: LayoutGroup[] };
export type WidgetSection = { name: string; description: string; visible: boolean; pinned: boolean; id: bigint; layout: LayoutGroup[] };
export function isWidgetSection(layoutRow: LayoutGroup): layoutRow is WidgetSection {
return Boolean((layoutRow as WidgetSection)?.layout);
}
@@ -1550,6 +1551,7 @@ function createLayoutGroup(layoutGroup: any): LayoutGroup {
if (layoutGroup.section) {
const result: WidgetSection = {
name: layoutGroup.section.name,
description: layoutGroup.section.description,
visible: layoutGroup.section.visible,
pinned: layoutGroup.section.pinned,
id: layoutGroup.section.id,