Skip to content

Commit 1a5dda6

Browse files
committed
improvement(canvas): add multi-block select, add batch handle, enabled, and edge operations
1 parent c2180bf commit 1a5dda6

File tree

28 files changed

+1432
-558
lines changed

28 files changed

+1432
-558
lines changed

apps/sim/app/(landing)/privacy/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ export default function PrivacyPolicy() {
767767
768768
</Link>
769769
</li>
770-
<li>Mailing Address: Sim, 80 Langton St, San Francisco, CA 94133, USA</li>
770+
<li>Mailing Address: Sim, 80 Langton St, San Francisco, CA 94103, USA</li>
771771
</ul>
772772
<p>We will respond to your request within a reasonable timeframe.</p>
773773
</section>

apps/sim/app/_styles/globals.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,38 @@
4242
animation: dash-animation 1.5s linear infinite !important;
4343
}
4444

45+
/**
46+
* React Flow selection box styling
47+
* Uses brand-secondary color for selection highlighting
48+
*/
49+
.react-flow__selection {
50+
background: rgba(51, 180, 255, 0.08) !important;
51+
border: 1px solid var(--brand-secondary) !important;
52+
}
53+
54+
.react-flow__nodesselection-rect {
55+
background: transparent !important;
56+
border: none !important;
57+
}
58+
59+
/**
60+
* Selected node ring indicator
61+
* Uses a pseudo-element overlay to match the original behavior (absolute inset-0 z-40)
62+
*/
63+
.react-flow__node.selected > div > div {
64+
position: relative;
65+
}
66+
67+
.react-flow__node.selected > div > div::after {
68+
content: "";
69+
position: absolute;
70+
inset: 0;
71+
z-index: 40;
72+
border-radius: 8px;
73+
box-shadow: 0 0 0 1.75px var(--brand-secondary);
74+
pointer-events: none;
75+
}
76+
4577
/**
4678
* Color tokens - single source of truth for all colors
4779
* Light mode: Warm theme

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
useFloatBoundarySync,
4646
useFloatDrag,
4747
useFloatResize,
48-
} from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-float'
48+
} from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/float'
4949
import { useWorkflowExecution } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution'
5050
import type { BlockLog, ExecutionResult } from '@/executor/types'
5151
import { getChatPosition, useChatStore } from '@/stores/chat/store'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components/drag-preview.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ export function createDragPreview(info: DragItemInfo): HTMLElement {
3232
z-index: 9999;
3333
`
3434

35-
// Create icon container
3635
const iconContainer = document.createElement('div')
3736
iconContainer.style.cssText = `
3837
width: 24px;
@@ -45,7 +44,6 @@ export function createDragPreview(info: DragItemInfo): HTMLElement {
4544
flex-shrink: 0;
4645
`
4746

48-
// Clone the actual icon if provided
4947
if (info.iconElement) {
5048
const clonedIcon = info.iconElement.cloneNode(true) as HTMLElement
5149
clonedIcon.style.width = '16px'
@@ -55,11 +53,10 @@ export function createDragPreview(info: DragItemInfo): HTMLElement {
5553
iconContainer.appendChild(clonedIcon)
5654
}
5755

58-
// Create text element
5956
const text = document.createElement('span')
6057
text.textContent = info.name
6158
text.style.cssText = `
62-
color: #FFFFFF;
59+
color: var(--text-primary);
6360
font-size: 16px;
6461
font-weight: 500;
6562
white-space: nowrap;

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,9 +1489,7 @@ export function Terminal() {
14891489
variant='ghost'
14901490
className={clsx(
14911491
'px-[8px] py-[6px] text-[12px]',
1492-
!showInput &&
1493-
hasInputData &&
1494-
'!text-[var(--text-primary)] dark:!text-[var(--text-primary)]'
1492+
!showInput ? '!text-[var(--text-primary)]' : '!text-[var(--text-tertiary)]'
14951493
)}
14961494
onClick={(e) => {
14971495
e.stopPropagation()
@@ -1509,7 +1507,7 @@ export function Terminal() {
15091507
variant='ghost'
15101508
className={clsx(
15111509
'px-[8px] py-[6px] text-[12px]',
1512-
showInput && '!text-[var(--text-primary)]'
1510+
showInput ? '!text-[var(--text-primary)]' : '!text-[var(--text-tertiary)]'
15131511
)}
15141512
onClick={(e) => {
15151513
e.stopPropagation()

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/action-bar/action-bar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export const ActionBar = memo(
3434
const {
3535
collaborativeBatchAddBlocks,
3636
collaborativeBatchRemoveBlocks,
37-
collaborativeToggleBlockEnabled,
38-
collaborativeToggleBlockHandles,
37+
collaborativeBatchToggleBlockEnabled,
38+
collaborativeBatchToggleBlockHandles,
3939
} = useCollaborativeWorkflow()
4040
const { activeWorkflowId } = useWorkflowRegistry()
4141
const blocks = useWorkflowStore((state) => state.blocks)
@@ -121,7 +121,7 @@ export const ActionBar = memo(
121121
onClick={(e) => {
122122
e.stopPropagation()
123123
if (!disabled) {
124-
collaborativeToggleBlockEnabled(blockId)
124+
collaborativeBatchToggleBlockEnabled([blockId])
125125
}
126126
}}
127127
className='hover:!text-[var(--text-inverse)] h-[23px] w-[23px] rounded-[8px] bg-[var(--surface-7)] p-0 text-[var(--text-secondary)] hover:bg-[var(--brand-secondary)]'
@@ -192,7 +192,7 @@ export const ActionBar = memo(
192192
onClick={(e) => {
193193
e.stopPropagation()
194194
if (!disabled) {
195-
collaborativeToggleBlockHandles(blockId)
195+
collaborativeBatchToggleBlockHandles([blockId])
196196
}
197197
}}
198198
className='hover:!text-[var(--text-inverse)] h-[23px] w-[23px] rounded-[8px] bg-[var(--surface-7)] p-0 text-[var(--text-secondary)] hover:bg-[var(--brand-secondary)]'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-float/index.ts renamed to apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/float/index.ts

File renamed without changes.

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-float/use-float-boundary-sync.ts renamed to apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/float/use-float-boundary-sync.ts

File renamed without changes.

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-float/use-float-drag.ts renamed to apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/float/use-float-drag.ts

File renamed without changes.

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-float/use-float-resize.ts renamed to apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/float/use-float-resize.ts

File renamed without changes.

0 commit comments

Comments
 (0)