-
Notifications
You must be signed in to change notification settings - Fork 491
fix(vue-nodes): hide slot labels for reroute nodes with empty names #8574
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reroute nodes use empty string slot names to intentionally display as minimal connection-only nodes. The slot components incorrectly used || operator for fallback labels, treating '' as falsy. Add hasNoLabel computed to detect when all label sources are empty, and derive dotOnly from either the prop OR hasNoLabel being true. This hides labels and removes padding for reroute-style slots. Amp-Thread-ID: https://ampcode.com/threads/T-019c21e5-e0f2-72fe-9e5e-84825e364e02
🎭 Playwright Tests: ✅ PassedResults: 508 passed, 0 failed, 0 flaky, 8 skipped (Total: 516) 📊 Browser Reports
|
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 02/03/2026, 05:09:23 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
📝 WalkthroughWalkthroughBoth InputSlot and OutputSlot Vue components now auto-detect when slots lack labels and automatically enable "dot-only" rendering mode through new computed properties, eliminating the need for explicit manual configuration while maintaining consistent label-visibility logic across both components. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 22.7 kB (baseline 22.7 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 835 kB (baseline 835 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 69.2 kB (baseline 69.2 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed Panels & Settings — 446 kB (baseline 446 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 12 added / 12 removed User & Accounts — 16.1 kB (baseline 16.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed Editors & Dialogs — 3.57 kB (baseline 3.57 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 28 kB (baseline 28 kB) • ⚪ 0 BReusable component library chunks
Status: 4 added / 4 removed Data & Services — 2.1 MB (baseline 2.1 MB) • 🔴 +409 BStores, services, APIs, and repositories
Status: 11 added / 11 removed Utilities & Hooks — 234 kB (baseline 234 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 12 added / 12 removed Vendor & Third-Party — 9.37 MB (baseline 9.37 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 6.99 MB (baseline 6.99 MB) • ⚪ 0 BBundles that do not match a named category
Status: 49 added / 49 removed |
…8574) ## Summary Fixes reroute node styling in Vue Nodes 2.0 by hiding slot labels when slot names are intentionally empty. | Before | After | | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | <img width="1437" height="473" alt="image" src="https://github.com/user-attachments/assets/603f52e0-7b75-4822-8c91-0a8374cc0cb6" /> | <img width="1350" height="493" alt="image" src="https://github.com/user-attachments/assets/38168955-4d35-4c61-a685-a54efb44cd5d" /> | ## 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. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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 <!-- end of auto-generated comment: release notes by coderabbit.ai --> ┆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)
…8574) ## Summary Fixes reroute node styling in Vue Nodes 2.0 by hiding slot labels when slot names are intentionally empty. | Before | After | | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | <img width="1437" height="473" alt="image" src="https://github.com/user-attachments/assets/603f52e0-7b75-4822-8c91-0a8374cc0cb6" /> | <img width="1350" height="493" alt="image" src="https://github.com/user-attachments/assets/38168955-4d35-4c61-a685-a54efb44cd5d" /> | ## 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. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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 <!-- end of auto-generated comment: release notes by coderabbit.ai --> ┆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)
|
@christian-byrne Successfully backported to #8727 |
|
@christian-byrne Successfully backported to #8728 |
|
@coderabbitai Open a tracking issue to add Storybook stories to cover nodes including this. |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain
🏁 Script executed: Length of output: 57
🧠 Learnings used |
…es with empty names (#8727) Backport of #8574 to `core/1.38` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8727-backport-core-1-38-fix-vue-nodes-hide-slot-labels-for-reroute-nodes-with-empty-names-3006d73d365081cc85b0fbb503fc130b) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org>
…des with empty names (#8728) Backport of #8574 to `cloud/1.38` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8728-backport-cloud-1-38-fix-vue-nodes-hide-slot-labels-for-reroute-nodes-with-empty-names-3006d73d3650816a9d83d96fe00389b2) by [Unito](https://www.unito.io) Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Summary
Fixes reroute node styling in Vue Nodes 2.0 by hiding slot labels when slot names are intentionally empty.
Problem
Reroute nodes displayed unwanted fallback labels ("Input 0", "Output 0") instead of appearing as minimal connection-only nodes. This happened because:
"") for slot names||operator for fallback labels, treating''as falsySolution
hasNoLabelcomputed property to detect when all label sources (label,localized_name,name) are empty/falsydotOnlyfrom either the existing prop ORhasNoLabelbeing truedotOnlyis true: label text is hidden, padding removed (lg-slot--dot-onlyclass), only connection dot visibleCombined with existing
NO_TITLEsupport from #7589, reroutes now display as minimal nodes with just connection dots—matching classic reroute appearance.Summary by CodeRabbit
Release Notes
┆Issue is synchronized with this Notion page by Unito