Filtering based on types false negatives
If I search for nodes based on the query "search for nodes filtering for 'type:Vector[] Repeat Array", I get no results:
<img width="505" height="148" alt="search for nodes filtering for 'type:Vector[] Repeat Array with no results'" src="https://github.com/user-attachments/assets/5b667574-5fb0-49b6-86a3-bc3e82ff0c5b" />
This is rather unexpected as there is a node with the name « Repeat Array » that accepts `List<Vector>` as an input.
This bug occurs because only the type of the default inputs are sent to the frontend:
https://github.com/GraphiteEditor/Graphite/blob/97f8113fe43d41b15ca3a56c300c48b7c8fda5c4/editor/src/messages/portfolio/document/node_graph/document_node_definitions.rs#L2098-L2104
Default types are (unless otherwise specified) based on the first implementation. This means for the « Repeat Array » node it will be a `List<Graphic>`:
https://github.com/GraphiteEditor/Graphite/blob/97f8113fe43d41b15ca3a56c300c48b7c8fda5c4/node-graph/node-macro/src/codegen.rs#L188-L191
This is then used for the filtering in the svelte node catalogue:
https://github.com/GraphiteEditor/Graphite/blob/97f8113fe43d41b15ca3a56c300c48b7c8fda5c4/frontend/src/components/floating-menus/NodeCatalog.svelte#L49
A proper solution would be to send all possible input types for the purposes of filtering.
0 条评论