Skip to content

Commit cde590a

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(ui): retain existing workflow resource picker styling
1 parent d0cdbf2 commit cde590a

10 files changed

Lines changed: 20 additions & 32 deletions

File tree

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/credential-selector.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useCallback, useEffect, useMemo, useState } from 'react'
4-
import { Chip, ChipCombobox, type ComboboxOptionGroup } from '@sim/emcn'
4+
import { Chip, Combobox, type ComboboxOptionGroup } from '@sim/emcn'
55
import { Key, SquareArrowUpRight } from '@sim/emcn/icons'
66
import { useParams } from 'next/navigation'
77
import { consumeOAuthReturnContext, writeOAuthReturnContext } from '@/lib/credentials/client-state'
@@ -445,7 +445,7 @@ export function CredentialSelector({
445445

446446
return (
447447
<div>
448-
<ChipCombobox
448+
<Combobox
449449
options={comboboxOptions}
450450
groups={comboboxGroups}
451451
value={displayValue}

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useCallback, useMemo } from 'react'
4-
import { ChipCombobox, ChipTag, type ComboboxOption } from '@sim/emcn'
4+
import { ChipTag, Combobox, type ComboboxOption } from '@sim/emcn'
55
import { X } from '@sim/emcn/icons'
66
import { useQueries } from '@tanstack/react-query'
77
import { useParams } from 'next/navigation'
@@ -211,7 +211,7 @@ export function KnowledgeBaseSelector({
211211
</div>
212212
)}
213213

214-
<ChipCombobox
214+
<Combobox
215215
options={options}
216216
value={isMultiSelect ? undefined : (selectedIds[0] ?? '')}
217217
multiSelect={isMultiSelect}

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-server-selector.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { ChipCombobox } from '@sim/emcn'
3+
import { Combobox } from '@sim/emcn'
44
import { useParams } from 'next/navigation'
55
import { McpIcon } from '@/components/icons'
66
import { getMcpTargetOptions } from '@/components/mcp/target-options'
@@ -65,7 +65,7 @@ export function McpServerSelector({
6565
})
6666

6767
return (
68-
<ChipCombobox
68+
<Combobox
6969
options={comboboxOptions}
7070
value={inputValue}
7171
selectedValue={selectedServerId}

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-tool-selector.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useMemo } from 'react'
4-
import { ChipCombobox } from '@sim/emcn'
4+
import { Combobox } from '@sim/emcn'
55
import { useParams } from 'next/navigation'
66
import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text'
77
import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight'
@@ -86,7 +86,7 @@ export function McpToolSelector({
8686
})
8787

8888
return (
89-
<ChipCombobox
89+
<Combobox
9090
options={comboboxOptions}
9191
value={inputValue}
9292
selectedValue={selectedToolId}

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/model-fallback-list/model-fallback-list.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ vi.mock('@sim/emcn', () => ({
4646
{children}
4747
</button>
4848
),
49-
ChipCombobox: ({
49+
Combobox: ({
5050
options,
5151
value,
5252
placeholder,

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/model-fallback-list/model-fallback-list.tsx‎

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
'use client'
22

33
import { memo, useCallback, useEffect, useMemo, useRef } from 'react'
4-
import {
5-
Button,
6-
Chip,
7-
ChipCombobox,
8-
ChipSelect,
9-
type ComboboxOption,
10-
Label,
11-
Tooltip,
12-
} from '@sim/emcn'
4+
import { Button, Chip, ChipSelect, Combobox, type ComboboxOption, Label, Tooltip } from '@sim/emcn'
135
import { ChevronDown, ChevronUp, Plus, Trash } from '@sim/emcn/icons'
146
import { generateShortId } from '@sim/utils/id'
157
import { useParams } from 'next/navigation'
@@ -188,7 +180,7 @@ const FallbackRow = memo(function FallbackRow({
188180
</div>
189181

190182
<div className='flex flex-col gap-2.5 rounded-b-[4px] border-[var(--border)] border-t bg-[var(--surface-2)] p-2'>
191-
<ChipCombobox
183+
<Combobox
192184
options={modelOptions}
193185
value={row.model}
194186
onChange={(model) => onChangeModel(row.id, model)}
@@ -203,7 +195,7 @@ const FallbackRow = memo(function FallbackRow({
203195
{needsApiKey && (
204196
<div className='flex flex-col gap-2.5'>
205197
<Label className='pl-0.5'>API key</Label>
206-
<ChipCombobox
198+
<Combobox
207199
options={envVarOptions}
208200
value={apiKeyValue}
209201
onChange={(apiKey) => onChangeApiKey(row.id, apiKey)}

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table-selector/table-selector.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useCallback, useMemo } from 'react'
4-
import { ChipCombobox, type ComboboxOption } from '@sim/emcn'
4+
import { Combobox, type ComboboxOption } from '@sim/emcn'
55
import { useParams } from 'next/navigation'
66
import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text'
77
import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight'
@@ -93,7 +93,7 @@ export function TableSelector({
9393
})
9494

9595
return (
96-
<ChipCombobox
96+
<Combobox
9797
options={options}
9898
value={tableId ?? undefined}
9999
onChange={handleChange}

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workspace-folder-selector/workspace-folder-selector.test.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ vi.mock('next/navigation', () => ({
2020
}))
2121

2222
vi.mock('@sim/emcn', () => ({
23-
ChipCombobox: ({
23+
Combobox: ({
2424
options,
2525
disabled,
2626
isLoading,

‎apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workspace-folder-selector/workspace-folder-selector.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use client'
22

33
import { useMemo } from 'react'
4-
import { ChipCombobox } from '@sim/emcn'
4+
import { Combobox } from '@sim/emcn'
55
import { useParams } from 'next/navigation'
66
import type { FolderResourceType } from '@/lib/api/contracts/folders'
77
import { parseFolderPath } from '@/lib/folders/paths'
@@ -58,7 +58,7 @@ export function WorkspaceFolderSelector({
5858
}, [folders, isPlaceholderData, required, subBlock.multiSelect, subBlock.placeholder])
5959

6060
return (
61-
<ChipCombobox
61+
<Combobox
6262
options={options}
6363
value={subBlock.multiSelect ? undefined : selected}
6464
onChange={(value) => {

‎apps/sim/components/mcp/mcp-selectors.test.tsx‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/** @vitest-environment node */
22
import type { ComponentProps } from 'react'
3-
import type { ChipCombobox } from '@sim/emcn'
3+
import type { Combobox } from '@sim/emcn'
44
import { renderToStaticMarkup } from 'react-dom/server'
55
import { beforeEach, describe, expect, it, vi } from 'vitest'
66

77
const mocks = vi.hoisted(() => ({
8-
combobox: vi.fn<(props: ComponentProps<typeof ChipCombobox>) => null>(() => null),
8+
combobox: vi.fn<(props: ComponentProps<typeof Combobox>) => null>(() => null),
99
setValue: vi.fn(),
1010
longInput: vi.fn(() => null),
1111
shortInput: vi.fn(() => null),
@@ -38,11 +38,7 @@ vi.mock('@/stores/workflow-diff/store', () => ({
3838
},
3939
}),
4040
}))
41-
vi.mock('@sim/emcn', () => ({
42-
Combobox: mocks.combobox,
43-
ChipCombobox: mocks.combobox,
44-
Label: () => null,
45-
}))
41+
vi.mock('@sim/emcn', () => ({ Combobox: mocks.combobox, Label: () => null }))
4642
vi.mock(
4743
'@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input',
4844
() => ({ LongInput: mocks.longInput })

0 commit comments

Comments
 (0)