Fix regression where tooltip node descriptions in the graph stopped showing (#3639)

* Fix tooltips

* Convert DefinitionIdentifier to string in JavaScript

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
Adam Gerhant
2026-01-15 23:30:16 -08:00
committed by GitHub
co-authored by Keavon Chambers
parent c60ddcf875
commit c13647aef4
10 changed files with 47 additions and 51 deletions
@@ -1,7 +1,7 @@
<script lang="ts">
import { createEventDispatcher, getContext, onMount } from "svelte";
import type { DefinitionIdentifier, FrontendNodeType } from "@graphite/messages";
import type { FrontendNodeType } from "@graphite/messages";
import type { NodeGraphState } from "@graphite/state-providers/node-graph";
import LayoutCol from "@graphite/components/layout/LayoutCol.svelte";
@@ -9,7 +9,7 @@
import TextInput from "@graphite/components/widgets/inputs/TextInput.svelte";
import TextLabel from "@graphite/components/widgets/labels/TextLabel.svelte";
const dispatch = createEventDispatcher<{ selectNodeType: DefinitionIdentifier }>();
const dispatch = createEventDispatcher<{ selectNodeType: string }>();
const nodeGraph = getContext<NodeGraphState>("nodeGraph");
// Content
@@ -125,7 +125,7 @@
{disabled}
label={nodeType.name}
tooltipLabel={nodeType.name}
tooltipDescription={$nodeGraph.nodeDescriptions.get(nodeType.identifier)}
tooltipDescription={nodeType.identifier ? $nodeGraph.nodeDescriptions.get(nodeType.identifier) : undefined}
action={() => dispatch("selectNodeType", nodeType.identifier)}
/>
{/each}