@@ -8,7 +8,7 @@ use super::nodes::SelectedNodes;
88use crate :: consts:: { EXPORTS_TO_RIGHT_EDGE_PIXEL_GAP , EXPORTS_TO_TOP_EDGE_PIXEL_GAP , GRID_SIZE , IMPORTS_TO_LEFT_EDGE_PIXEL_GAP , IMPORTS_TO_TOP_EDGE_PIXEL_GAP } ;
99use crate :: messages:: portfolio:: document:: graph_operation:: utility_types:: ModifyInputsContext ;
1010use crate :: messages:: portfolio:: document:: node_graph:: document_node_definitions:: { DocumentNodeDefinition , resolve_document_node_type} ;
11- use crate :: messages:: portfolio:: document:: node_graph:: utility_types:: { Direction , FrontendClickTargets , FrontendGraphInput , FrontendGraphOutput } ;
11+ use crate :: messages:: portfolio:: document:: node_graph:: utility_types:: { Direction , FrontendClickTargets , FrontendGraphDataType , FrontendGraphInput , FrontendGraphOutput } ;
1212use crate :: messages:: portfolio:: document:: utility_types:: network_interface:: resolved_types:: ResolvedDocumentNodeTypes ;
1313use crate :: messages:: portfolio:: document:: utility_types:: wires:: { GraphWireStyle , WirePath , WirePathUpdate , build_vector_wire} ;
1414use crate :: messages:: tool:: common_functionality:: graph_modification_utils;
@@ -625,7 +625,7 @@ impl NodeNetworkInterface {
625625 }
626626 let input_type = self . input_type ( input_connector, network_path) ;
627627 let data_type = input_type. displayed_type ( ) ;
628- let resolved_type = input_type. resolved_type_name ( ) ;
628+ let resolved_type = input_type. resolved_type_node_string ( ) ;
629629
630630 let connected_to = self
631631 . upstream_output_connector ( input_connector, network_path)
@@ -656,7 +656,7 @@ impl NodeNetworkInterface {
656656
657657 let export_name = if !export_name. is_empty ( ) {
658658 export_name
659- } else if let Some ( export_type_name) = input_type. compiled_nested_type_name ( ) {
659+ } else if let Some ( export_type_name) = input_type. compiled_nested_type ( ) . map ( |nested| nested . to_string ( ) ) {
660660 export_type_name
661661 } else {
662662 format ! ( "Export index {}" , export_index)
@@ -679,7 +679,6 @@ impl NodeNetworkInterface {
679679 /// Returns None if there is an error, it is the document network, a hidden primary output or import
680680 pub fn frontend_output_from_connector ( & mut self , output_connector : & OutputConnector , network_path : & [ NodeId ] ) -> Option < FrontendGraphOutput > {
681681 let output_type = self . output_type ( output_connector, network_path) ;
682-
683682 let ( name, description) = match output_connector {
684683 OutputConnector :: Node { node_id, output_index } => {
685684 // Do not display the primary output port for a node if it is a network node with a hidden primary export
@@ -690,7 +689,7 @@ impl NodeNetworkInterface {
690689 let node_metadata = self . node_metadata ( node_id, network_path) ?;
691690 let output_name = node_metadata. persistent_metadata . output_names . get ( * output_index) . cloned ( ) . unwrap_or_default ( ) ;
692691
693- let output_name = if !output_name. is_empty ( ) { output_name } else { output_type. resolved_type_name ( ) } ;
692+ let output_name = if !output_name. is_empty ( ) { output_name } else { output_type. resolved_type_node_string ( ) } ;
694693 ( output_name, String :: new ( ) )
695694 }
696695 OutputConnector :: Import ( import_index) => {
@@ -707,7 +706,7 @@ impl NodeNetworkInterface {
707706
708707 let import_name = if !import_name. is_empty ( ) {
709708 import_name
710- } else if let Some ( import_type_name) = output_type. compiled_nested_type_name ( ) {
709+ } else if let Some ( import_type_name) = output_type. compiled_nested_type ( ) . map ( |nested| nested . to_string ( ) ) {
711710 import_type_name
712711 } else {
713712 format ! ( "Import index {}" , import_index)
@@ -717,7 +716,7 @@ impl NodeNetworkInterface {
717716 }
718717 } ;
719718 let data_type = output_type. displayed_type ( ) ;
720- let resolved_type = output_type. resolved_type_name ( ) ;
719+ let resolved_type = output_type. resolved_type_node_string ( ) ;
721720 let mut connected_to = self
722721 . outward_wires ( network_path)
723722 . and_then ( |outward_wires| outward_wires. get ( output_connector) )
@@ -977,7 +976,7 @@ impl NodeNetworkInterface {
977976 } ;
978977 let description = input_metadata. input_description . to_string ( ) ;
979978 let name = if input_metadata. input_name . is_empty ( ) {
980- self . input_type ( & InputConnector :: node ( * node_id, input_index) , network_path) . resolved_type_name ( )
979+ self . input_type ( & InputConnector :: node ( * node_id, input_index) , network_path) . resolved_type_node_string ( )
981980 } else {
982981 input_metadata. input_name . to_string ( )
983982 } ;
@@ -1015,7 +1014,7 @@ impl NodeNetworkInterface {
10151014 pub fn description ( & self , node_id : & NodeId , network_path : & [ NodeId ] ) -> String {
10161015 self . get_node_definition ( node_id, network_path)
10171016 . map ( |node_definition| node_definition. description . to_string ( ) )
1018- . filter ( |description : & String | description != "TODO" )
1017+ . filter ( |description| description != "TODO" )
10191018 . unwrap_or_default ( )
10201019 }
10211020
@@ -2455,7 +2454,10 @@ impl NodeNetworkInterface {
24552454 pub fn wire_path_from_input ( & mut self , input : & InputConnector , graph_wire_style : GraphWireStyle , dashed : bool , network_path : & [ NodeId ] ) -> Option < WirePath > {
24562455 let ( vector_wire, thick) = self . vector_wire_from_input ( input, graph_wire_style, network_path) ?;
24572456 let path_string = vector_wire. to_svg ( ) ;
2458- let data_type = self . input_type ( input, network_path) . displayed_type ( ) ;
2457+ let data_type = self
2458+ . upstream_output_connector ( input, network_path)
2459+ . map ( |output| self . output_type ( & output, network_path) . displayed_type ( ) )
2460+ . unwrap_or ( FrontendGraphDataType :: General ) ;
24592461 Some ( WirePath {
24602462 path_string,
24612463 data_type,
0 commit comments