This allows a user to trigger an event externally as if it was created
by UI. For example, to remove a node one just needs to insert a
NodeRespone::DeleteNodeUi. Without this feature one needs to remove the
node from the graph *and* adjust the internal state of GraphEditorState.
* Add CategoryTrait that gives a name to a category of nodes. Provide
implementations for String, &str and ().
* Add NodeTemplateTrait::node_finder_categories to list categories to
which the template belongs, defaults to an empty vector.
* Node finder now displays at the top a collapsible header for each
category and corresponding nodes inside of them. Nodes without a
category are displayed below, so the behavior of programs that don't
adapt to use categories remains the same. The collapsible headers
behave as follows:
- For empty query, all categories are collapsed
- Otherwise:
1. Categories that contain no matching nodes are ommited.
2. Matching categories are now opened by default -- it's assumed
that filtered results are more manageable and can now be
unwrapped.
3. The user can normally un/collapse each category, but if the
query is changed, the default is applied.
* Update the example to use this feature.
This change will break all existing programs and the simplest fix to
that is adding `type CategoryType = ();` in the implementation of
`NodeTemplateTrait`. Default associated types are not supported, so
this can't be avoided with this design.