mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 05:32:02 +00:00
[backport cloud/1.42] fix: subgraph promoted widget input label rename (#10421)
Backport of #10195 to cloud/1.42. Cherry-picked from the core/1.42 backport commits (identical codebase). Test fix included: `renameWidget` test passes `parents` explicitly since 1.42 uses `parents?.length` (not `node.isSubgraphNode()` fallback). Also includes negative test for subgraph node without parents. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10421-backport-cloud-1-42-fix-subgraph-promoted-widget-input-label-rename-32d6d73d3650813fbf60fa32a7542518) by [Unito](https://www.unito.io) Co-authored-by: Alexander Brown <drjkl@comfy.org>
This commit is contained in:
committed by
GitHub
parent
01b6f5258c
commit
0a65309dd2
@@ -197,14 +197,16 @@ describe('Widget slotMetadata reactivity on link disconnect', () => {
|
||||
|
||||
const subgraphNode = createTestSubgraphNode(subgraph, { id: 123 })
|
||||
|
||||
// Create a PromotedWidgetView with displayName="value" (subgraph input
|
||||
// Create a PromotedWidgetView with identityName="value" (subgraph input
|
||||
// slot name) and sourceWidgetName="prompt" (interior widget name).
|
||||
// PromotedWidgetView.name returns "value", but safeWidgetMapper sets
|
||||
// SafeWidgetData.name to sourceWidgetName ("prompt").
|
||||
// PromotedWidgetView.name returns "value" (identity), safeWidgetMapper
|
||||
// sets SafeWidgetData.name to sourceWidgetName ("prompt").
|
||||
const promotedView = createPromotedWidgetView(
|
||||
subgraphNode,
|
||||
'10',
|
||||
'prompt',
|
||||
'value',
|
||||
undefined,
|
||||
'value'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user