mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-21 07:38:12 +08:00
Make the node catalog, originating from a wire dropped in the graph, filter for valid types (#2423)
* Add InputType based filtering capabilites to NodeCatalog. Send InputTypes through SendUiMetadata under odeTypes. Update NodeCatalog.svelte component to support ype based filtering. Update ContextMenuData to support compatibleType as an input to the searchTerm for the NodeCatalog. Update Graph.svelte component to support new ContextMenuData enum types. Send CompatibleType data from rust backend on wire drag and release to NodeCatalog to already show filtered data. * Add InputType based filtering capabilites to NodeCatalog. Send InputTypes through SendUiMetadata under odeTypes. Update NodeCatalog.svelte component to support ype based filtering. Update ContextMenuData to support compatibleType as an input to the searchTerm for the NodeCatalog. Update Graph.svelte component to support new ContextMenuData enum types. Send CompatibleType data from rust backend on wire drag and release to NodeCatalog to already show filtered data. * Open NodeCatalog on DoubleClick in empty node graph area * Capture Node implementations and filter out uncatogrised nodes before sending metadata. Update NodeCatalog Search filter to support single type search alongside name and category search * Take union of DocumentNodeTypes and registered node implementations, Update missing categories and make sure to remove nodes with empty categories * Code review --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
8b0f16e74c
commit
93f7004ece
@@ -653,8 +653,10 @@
|
||||
top: `${$nodeGraph.contextMenuInformation.contextMenuCoordinates.y * $nodeGraph.transform.scale + $nodeGraph.transform.y}px`,
|
||||
}}
|
||||
>
|
||||
{#if $nodeGraph.contextMenuInformation.contextMenuData === "CreateNode"}
|
||||
{#if typeof $nodeGraph.contextMenuInformation.contextMenuData === "string" && $nodeGraph.contextMenuInformation.contextMenuData === "CreateNode"}
|
||||
<NodeCatalog on:selectNodeType={(e) => createNode(e.detail)} />
|
||||
{:else if $nodeGraph.contextMenuInformation.contextMenuData && "compatibleType" in $nodeGraph.contextMenuInformation.contextMenuData}
|
||||
<NodeCatalog initialSearchTerm={$nodeGraph.contextMenuInformation.contextMenuData.compatibleType || ""} on:selectNodeType={(e) => createNode(e.detail)} />
|
||||
{:else}
|
||||
{@const contextMenuData = $nodeGraph.contextMenuInformation.contextMenuData}
|
||||
<LayoutRow class="toggle-layer-or-node">
|
||||
|
||||
Reference in New Issue
Block a user