mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-24 18:08:12 +08:00
Improve clarify of type errors and tooltip diagnostics
This commit is contained in:
@@ -2234,7 +2234,7 @@ impl NodeGraphMessageHandler {
|
||||
let mut inputs = inputs.into_iter().map(|input| {
|
||||
input.map(|input| FrontendGraphInput {
|
||||
data_type: FrontendGraphDataType::displayed_type(&input.ty, &input.type_source),
|
||||
resolved_type: Some(format!("{:?} from {:?}", &input.ty, input.type_source)),
|
||||
resolved_type: Some(format!("{:?}", &input.ty)),
|
||||
valid_types: input.valid_types.iter().map(|ty| ty.to_string()).collect(),
|
||||
name: input.input_name.unwrap_or_else(|| input.ty.nested_type().to_string()),
|
||||
description: input.input_description.unwrap_or_default(),
|
||||
@@ -2258,7 +2258,7 @@ impl NodeGraphMessageHandler {
|
||||
data_type: frontend_data_type,
|
||||
name: "Output 1".to_string(),
|
||||
description: String::new(),
|
||||
resolved_type: primary_output_type.map(|(input, type_source)| format!("{input:?} from {type_source:?}")),
|
||||
resolved_type: primary_output_type.map(|(input, _)| format!("{input:?}")),
|
||||
connected_to,
|
||||
})
|
||||
} else {
|
||||
@@ -2292,7 +2292,7 @@ impl NodeGraphMessageHandler {
|
||||
data_type: frontend_data_type,
|
||||
name: output_name,
|
||||
description: String::new(),
|
||||
resolved_type: exposed_output.clone().map(|(input, type_source)| format!("{input:?} from {type_source:?}")),
|
||||
resolved_type: exposed_output.clone().map(|(input, _)| format!("{input:?}")),
|
||||
connected_to,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -816,7 +816,7 @@ impl NodeNetworkInterface {
|
||||
data_type,
|
||||
name: import_name,
|
||||
description: String::new(),
|
||||
resolved_type: Some(format!("{input_type:?} from {type_source:?}")),
|
||||
resolved_type: Some(format!("{input_type:?}")),
|
||||
connected_to,
|
||||
},
|
||||
click_target,
|
||||
@@ -901,7 +901,7 @@ impl NodeNetworkInterface {
|
||||
data_type: frontend_data_type,
|
||||
name: export_name,
|
||||
description: String::new(),
|
||||
resolved_type: input_type.map(|(export_type, source)| format!("{export_type:?} from {source:?}")),
|
||||
resolved_type: input_type.map(|(export_type, _source)| format!("{export_type:?}")),
|
||||
valid_types: self.valid_input_types(&InputConnector::Export(*export_index), network_path).iter().map(|ty| ty.to_string()).collect(),
|
||||
connected_to,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user