From 6535138e0b74decb1e31a0fa49ec73c0916a78b9 Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Sat, 7 Feb 2026 15:30:20 -0800 Subject: [PATCH] fix(vue-nodes): hide slot labels for reroute nodes with empty names (#8574) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fixes reroute node styling in Vue Nodes 2.0 by hiding slot labels when slot names are intentionally empty. | Before | After | | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | image | image | ## Problem Reroute nodes displayed unwanted fallback labels ("Input 0", "Output 0") instead of appearing as minimal connection-only nodes. This happened because: - Reroute nodes intentionally use empty string (`""`) for slot names - Slot components used `||` operator for fallback labels, treating `''` as falsy ## Solution - Add `hasNoLabel` computed property to detect when all label sources (`label`, `localized_name`, `name`) are empty/falsy - Derive `dotOnly` from either the existing prop OR `hasNoLabel` being true - When `dotOnly` is true: label text is hidden, padding removed (`lg-slot--dot-only` class), only connection dot visible Combined with existing `NO_TITLE` support from #7589, reroutes now display as minimal nodes with just connection dots—matching classic reroute appearance. ## Summary by CodeRabbit ## Release Notes * **Bug Fixes** * Enhanced input and output slot label handling to automatically conceal labels when unavailable * Improved fallback display names for slots with more reliable naming logic ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8574-fix-vue-nodes-hide-slot-labels-for-reroute-nodes-with-empty-names-2fc6d73d365081c38031e260402283d3) by [Unito](https://www.unito.io) --- .../extensions/vueNodes/components/InputSlot.vue | 15 +++++++++++---- .../extensions/vueNodes/components/OutputSlot.vue | 14 +++++++++++--- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/renderer/extensions/vueNodes/components/InputSlot.vue b/src/renderer/extensions/vueNodes/components/InputSlot.vue index 61c4dd35a8..ba8ae57b1d 100644 --- a/src/renderer/extensions/vueNodes/components/InputSlot.vue +++ b/src/renderer/extensions/vueNodes/components/InputSlot.vue @@ -7,7 +7,7 @@ cn( 'lg-slot lg-slot--input flex items-center group rounded-r-lg m-0', 'cursor-crosshair', - props.dotOnly ? 'lg-slot--dot-only' : 'pr-6', + dotOnly ? 'lg-slot--dot-only' : 'pr-6', { 'lg-slot--connected': props.connected, 'lg-slot--compatible': props.compatible, @@ -36,7 +36,7 @@
- - {{ slotData.localized_name || slotData.name || `Output ${index}` }} + + {{ slotData.localized_name || (slotData.name ?? `Output ${index}`) }}
@@ -44,6 +47,11 @@ interface OutputSlotProps { const props = defineProps() +const hasNoLabel = computed( + () => !props.slotData.localized_name && props.slotData.name === '' +) +const dotOnly = computed(() => props.dotOnly || hasNoLabel.value) + // Error boundary implementation const renderError = ref(null) @@ -79,7 +87,7 @@ const slotWrapperClass = computed(() => cn( 'lg-slot lg-slot--output flex items-center justify-end group rounded-l-lg h-6', 'cursor-crosshair', - props.dotOnly ? 'lg-slot--dot-only justify-center' : 'pl-6', + dotOnly.value ? 'lg-slot--dot-only justify-center' : 'pl-6', { 'lg-slot--connected': props.connected, 'lg-slot--compatible': props.compatible,