Skip to content

Commit 14add6d

Browse files
committed
improvement(editor): use absolute barrel imports over relative paths
Addresses review feedback: the no-barrel-import cleanup introduced relative imports that violate the absolute-import rule and conflict with the repo's barrel convention. Reverts to absolute barrel imports (deploy-modal, general, chat hooks, connection-blocks, toolbar, search-groups).
1 parent 605f4e8 commit 14add6d

6 files changed

Lines changed: 29 additions & 23 deletions

File tree

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { getEnv, isTruthy } from '@/lib/core/config/env'
2424
import { getBaseUrl, getEmailDomain } from '@/lib/core/utils/urls'
2525
import { quickValidateEmail } from '@/lib/messaging/email/validation'
2626
import { OutputSelect } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select'
27+
import { useIdentifierValidation } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/hooks'
2728
import {
2829
type AuthType,
2930
type ChatFormData,
@@ -32,7 +33,6 @@ import {
3233
useUpdateChat,
3334
} from '@/hooks/queries/chats'
3435
import type { ChatDetail } from '@/hooks/queries/deployments'
35-
import { useIdentifierValidation } from './hooks/use-identifier-validation'
3636
import {
3737
getPasswordHelperText,
3838
getPasswordPlaceholder,

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/general.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ import {
1919
} from '@sim/emcn'
2020
import { createLogger } from '@sim/logger'
2121
import type { WorkflowDeploymentVersionResponse } from '@/lib/workflows/persistence/utils'
22+
import { Versions } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components'
2223
import type { DeployReadiness } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-deploy-readiness'
2324
import { Preview, PreviewWorkflow } from '@/app/workspace/[workspaceId]/w/components/preview'
2425
import { useDeploymentVersionState, useRevertToVersion } from '@/hooks/queries/workflows'
2526
import { useWorkflowRegistry } from '@/stores/workflows/registry/store'
2627
import type { WorkflowState } from '@/stores/workflows/workflow/types'
27-
import { Versions } from './components/versions'
2828
import { formatVersionLabel } from './format-version-label'
2929

3030
const logger = createLogger('GeneralDeploy')

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ import { getInputFormatExample as getInputFormatExampleUtil } from '@/lib/workfl
2727
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
2828
import { CreateApiKeyModal } from '@/app/workspace/[workspaceId]/settings/components/api-keys/components'
2929
import { isBillingEnabled } from '@/app/workspace/[workspaceId]/settings/navigation'
30+
import {
31+
ApiDeploy,
32+
ChatDeploy,
33+
DeployUpgradeGate,
34+
type ExistingChat,
35+
GeneralDeploy,
36+
McpDeploy,
37+
} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components'
3038
import {
3139
releaseDeployAction,
3240
tryAcquireDeployAction,
@@ -54,12 +62,7 @@ import { useWorkflowRegistry } from '@/stores/workflows/registry/store'
5462
import { mergeSubblockState } from '@/stores/workflows/utils'
5563
import { useWorkflowStore } from '@/stores/workflows/workflow/store'
5664
import type { WorkflowState } from '@/stores/workflows/workflow/types'
57-
import { ApiDeploy } from './components/api/api'
58-
import { ChatDeploy, type ExistingChat } from './components/chat/chat'
59-
import { DeployUpgradeGate } from './components/deploy-upgrade-gate/deploy-upgrade-gate'
6065
import { ApiInfoModal } from './components/general/components/api-info-modal'
61-
import { GeneralDeploy } from './components/general/general'
62-
import { McpDeploy } from './components/mcp/mcp'
6366

6467
const logger = createLogger('DeployModal')
6568

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/subflow-editor/subflow-editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
import { ChevronUp } from 'lucide-react'
1212
import SimpleCodeEditor from 'react-simple-code-editor'
1313
import { WORKFLOW_SEARCH_SUBFLOW_FIELD_IDS } from '@/lib/workflows/search-replace/subflow-fields'
14+
import { ConnectionBlocks } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks'
1415
import {
1516
formatDisplayText,
1617
getValidWorkflowSearchRange,
@@ -21,7 +22,6 @@ import { useActiveSearchTarget } from '@/app/workspace/[workspaceId]/w/[workflow
2122
import type { BlockState } from '@/stores/workflows/workflow/types'
2223
import type { ConnectedBlock } from '../../hooks/use-block-connections'
2324
import { useSubflowEditor } from '../../hooks/use-subflow-editor'
24-
import { ConnectionBlocks } from '../connection-blocks/connection-blocks'
2525
import { WORKFLOW_SEARCH_HIGHLIGHT_CLASS } from '../constants'
2626

2727
const WORKFLOW_SEARCH_MATCH_PLACEHOLDER = '__WORKFLOW_SEARCH_MATCH__'

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/hooks/use-toolbar-item-interactions.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { useCallback, useRef } from 'react'
22
import { createLogger } from '@sim/logger'
3-
import { createDragPreview, type DragItemInfo } from '../components/drag-preview'
3+
import {
4+
createDragPreview,
5+
type DragItemInfo,
6+
} from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components'
47

58
const logger = createLogger('ToolbarItemInteractions')
69

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,6 @@ import { createPortal } from 'react-dom'
3737
import { captureEvent } from '@/lib/posthog/client'
3838
import { hasTriggerCapability } from '@/lib/workflows/triggers/trigger-utils'
3939
import { useInvokeGlobalCommand } from '@/app/workspace/[workspaceId]/providers/global-commands-provider'
40-
import {
41-
CMDK_ITEM_GAP_CLASS,
42-
CMDK_SECTION_GAP_CLASS,
43-
} from '@/app/workspace/[workspaceId]/w/components/sidebar/constants'
44-
import { SIDEBAR_SCROLL_EVENT } from '@/app/workspace/[workspaceId]/w/components/sidebar/sidebar'
45-
import { usePermissionConfig } from '@/hooks/use-permission-config'
46-
import { useSettingsNavigation } from '@/hooks/use-settings-navigation'
47-
import { useSearchModalStore } from '@/stores/modals/search/store'
48-
import type {
49-
SearchBlockItem,
50-
SearchDocItem,
51-
SearchToolOperationItem,
52-
} from '@/stores/modals/search/types'
5340
import {
5441
ActionsGroup,
5542
BlocksGroup,
@@ -66,7 +53,20 @@ import {
6653
TriggersGroup,
6754
WorkflowsGroup,
6855
WorkspacesGroup,
69-
} from './components/search-groups/search-groups'
56+
} from '@/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/search-groups'
57+
import {
58+
CMDK_ITEM_GAP_CLASS,
59+
CMDK_SECTION_GAP_CLASS,
60+
} from '@/app/workspace/[workspaceId]/w/components/sidebar/constants'
61+
import { SIDEBAR_SCROLL_EVENT } from '@/app/workspace/[workspaceId]/w/components/sidebar/sidebar'
62+
import { usePermissionConfig } from '@/hooks/use-permission-config'
63+
import { useSettingsNavigation } from '@/hooks/use-settings-navigation'
64+
import { useSearchModalStore } from '@/stores/modals/search/store'
65+
import type {
66+
SearchBlockItem,
67+
SearchDocItem,
68+
SearchToolOperationItem,
69+
} from '@/stores/modals/search/types'
7070
import type {
7171
ActionItem,
7272
FileItem,

0 commit comments

Comments
 (0)