Polish: Make the clickable area for the slots more forgiving (#7084)

## Summary

Makes the area a bit to the left and right of the dot also clickable.

Addresses complaints about it being tricky to connect nodes in Nodes
2.0.

---------

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Alexander Brown
2025-12-01 17:23:25 -08:00
committed by GitHub
parent 04158deb02
commit 6d22562d40
3 changed files with 7 additions and 4 deletions

View File

@@ -94,7 +94,7 @@ async function connectSlots(
const fromLoc = slotLocator(page, from.nodeId, from.index, false)
const toLoc = slotLocator(page, to.nodeId, to.index, true)
await expectVisibleAll(fromLoc, toLoc)
await fromLoc.dragTo(toLoc)
await fromLoc.dragTo(toLoc, { force: true })
await nextFrame()
}
@@ -183,7 +183,7 @@ test.describe('Vue Node Link Interaction', () => {
const inputSlot = slotLocator(comfyPage.page, clipNode.id, 0, true)
await expectVisibleAll(outputSlot, inputSlot)
await outputSlot.dragTo(inputSlot)
await outputSlot.dragTo(inputSlot, { force: true })
await comfyPage.nextFrame()
expect(await samplerOutput.getLinkCount()).toBe(0)
@@ -210,7 +210,7 @@ test.describe('Vue Node Link Interaction', () => {
const inputSlot = slotLocator(comfyPage.page, samplerNode.id, 3, true)
await expectVisibleAll(outputSlot, inputSlot)
await outputSlot.dragTo(inputSlot)
await outputSlot.dragTo(inputSlot, { force: true })
await comfyPage.nextFrame()
expect(await samplerOutput.getLinkCount()).toBe(0)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

View File

@@ -20,7 +20,10 @@ defineExpose({
<template>
<div
:class="
cn('size-6 flex items-center justify-center group/slot', props.class)
cn(
'after:absolute after:inset-y-0 after:w-5/2 relative size-6 flex items-center justify-center group/slot',
props.class
)
"
>
<div