From 59d85cb53e4e76110f89efb7e6c31897999ae375 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 30 Aug 2025 21:19:32 -0700 Subject: [PATCH] Remove valid types --- .../document/node_graph/utility_types.rs | 2 -- .../document/utility_types/network_interface.rs | 15 +++++++-------- frontend/src/components/views/Graph.svelte | 10 +++++----- frontend/src/messages.ts | 2 -- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/editor/src/messages/portfolio/document/node_graph/utility_types.rs b/editor/src/messages/portfolio/document/node_graph/utility_types.rs index 5449046e3a..07741ee003 100644 --- a/editor/src/messages/portfolio/document/node_graph/utility_types.rs +++ b/editor/src/messages/portfolio/document/node_graph/utility_types.rs @@ -59,8 +59,6 @@ pub struct FrontendGraphInput { pub description: String, #[serde(rename = "resolvedType")] pub resolved_type: String, - #[serde(rename = "validTypes")] - pub valid_types: Vec, #[serde(rename = "connectedTo")] /// Either "nothing", "import index {index}", or "{node name} output {output_index}". pub connected_to: String, diff --git a/editor/src/messages/portfolio/document/utility_types/network_interface.rs b/editor/src/messages/portfolio/document/utility_types/network_interface.rs index 7df2eb2eb2..27f93d5ecb 100644 --- a/editor/src/messages/portfolio/document/utility_types/network_interface.rs +++ b/editor/src/messages/portfolio/document/utility_types/network_interface.rs @@ -663,20 +663,19 @@ impl NodeNetworkInterface { }; // TODO: Move in separate Tooltip overlay - let valid_types = match self.valid_input_types(&input_connector, network_path) { - Ok(input_types) => input_types.iter().map(|ty| ty.to_string()).collect(), - Err(e) => { - log::error!("Error getting valid types for input {input_connector:?}: {e}"); - Vec::new() - } - }; + // let valid_types = match self.valid_input_types(&input_connector, network_path) { + // Ok(input_types) => input_types.iter().map(|ty| ty.to_string()).collect(), + // Err(e) => { + // log::error!("Error getting valid types for input {input_connector:?}: {e}"); + // Vec::new() + // } + // }; Some(FrontendGraphInput { data_type, resolved_type, name, description, - valid_types, connected_to, }) } diff --git a/frontend/src/components/views/Graph.svelte b/frontend/src/components/views/Graph.svelte index 9c8d2f8b58..d6cef02fec 100644 --- a/frontend/src/components/views/Graph.svelte +++ b/frontend/src/components/views/Graph.svelte @@ -177,7 +177,7 @@ } function inputTooltip(value: FrontendGraphInput): string { - return dataTypeTooltip(value) + "\n\n" + inputConnectedToText(value) + "\n\n" + validTypesText(value); + return dataTypeTooltip(value) + "\n\n" + inputConnectedToText(value) + "\n\n"; } function outputTooltip(value: FrontendGraphOutput): string { @@ -188,10 +188,10 @@ return `Data Type: ${value.resolvedType}`; } - function validTypesText(value: FrontendGraphInput): string { - const validTypes = value.validTypes.length > 0 ? value.validTypes.map((x) => `• ${x}`).join("\n") : "None"; - return `Valid Types:\n${validTypes}`; - } + // function validTypesText(value: FrontendGraphInput): string { + // const validTypes = value.validTypes.length > 0 ? value.validTypes.map((x) => `• ${x}`).join("\n") : "None"; + // return `Valid Types:\n${validTypes}`; + // } function outputConnectedToText(output: FrontendGraphOutput): string { if (output.connectedTo.length === 0) return "Connected to nothing"; diff --git a/frontend/src/messages.ts b/frontend/src/messages.ts index 83234a04d0..44d3bb5fa9 100644 --- a/frontend/src/messages.ts +++ b/frontend/src/messages.ts @@ -195,8 +195,6 @@ export class FrontendGraphInput { readonly resolvedType!: string; - readonly validTypes!: string[]; - readonly connectedTo!: string; }