Skip to content

Commit d98de76

Browse files
committed
Remove valid types
1 parent 0a570b2 commit d98de76

File tree

4 files changed

+12
-17
lines changed

4 files changed

+12
-17
lines changed

editor/src/messages/portfolio/document/node_graph/utility_types.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ pub struct FrontendGraphInput {
5959
pub description: String,
6060
#[serde(rename = "resolvedType")]
6161
pub resolved_type: String,
62-
#[serde(rename = "validTypes")]
63-
pub valid_types: Vec<String>,
6462
#[serde(rename = "connectedTo")]
6563
/// Either "nothing", "import index {index}", or "{node name} output {output_index}".
6664
pub connected_to: String,

editor/src/messages/portfolio/document/utility_types/network_interface.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -662,20 +662,19 @@ impl NodeNetworkInterface {
662662
};
663663

664664
// TODO: Move in separate Tooltip overlay
665-
let valid_types = match self.valid_input_types(&input_connector, network_path) {
666-
Ok(input_types) => input_types.iter().map(|ty| ty.to_string()).collect(),
667-
Err(e) => {
668-
log::error!("Error getting valid types for input {input_connector:?}: {e}");
669-
Vec::new()
670-
}
671-
};
665+
// let valid_types = match self.valid_input_types(&input_connector, network_path) {
666+
// Ok(input_types) => input_types.iter().map(|ty| ty.to_string()).collect(),
667+
// Err(e) => {
668+
// log::error!("Error getting valid types for input {input_connector:?}: {e}");
669+
// Vec::new()
670+
// }
671+
// };
672672

673673
Some(FrontendGraphInput {
674674
data_type,
675675
resolved_type,
676676
name,
677677
description,
678-
valid_types,
679678
connected_to,
680679
})
681680
}

frontend/src/components/views/Graph.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
}
178178
179179
function inputTooltip(value: FrontendGraphInput): string {
180-
return dataTypeTooltip(value) + "\n\n" + inputConnectedToText(value) + "\n\n" + validTypesText(value);
180+
return dataTypeTooltip(value) + "\n\n" + inputConnectedToText(value) + "\n\n";
181181
}
182182
183183
function outputTooltip(value: FrontendGraphOutput): string {
@@ -188,10 +188,10 @@
188188
return `Data Type: ${value.resolvedType}`;
189189
}
190190
191-
function validTypesText(value: FrontendGraphInput): string {
192-
const validTypes = value.validTypes.length > 0 ? value.validTypes.map((x) => `• ${x}`).join("\n") : "None";
193-
return `Valid Types:\n${validTypes}`;
194-
}
191+
// function validTypesText(value: FrontendGraphInput): string {
192+
// const validTypes = value.validTypes.length > 0 ? value.validTypes.map((x) => `• ${x}`).join("\n") : "None";
193+
// return `Valid Types:\n${validTypes}`;
194+
// }
195195
196196
function outputConnectedToText(output: FrontendGraphOutput): string {
197197
if (output.connectedTo.length === 0) return "Connected to nothing";

frontend/src/messages.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ export class FrontendGraphInput {
197197

198198
readonly resolvedType!: string;
199199

200-
readonly validTypes!: string[];
201-
202200
readonly connectedTo!: string;
203201
}
204202

0 commit comments

Comments
 (0)