Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/sim/app/workspace/[workspaceId]/files/files.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1565,7 +1565,10 @@ export function Files() {
}, [router, workspaceId])

const loadingBreadcrumbs = useMemo(
() => [{ label: 'Files', onClick: handleNavigateToFiles }, { label: '...' }],
(): BreadcrumbItem[] => [
{ label: 'Files', onClick: handleNavigateToFiles },
{ label: '…', terminal: true },
],
[handleNavigateToFiles]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ export { DeleteKnowledgeBaseModal } from './delete-knowledge-base-modal'
export { EditKnowledgeBaseModal } from './edit-knowledge-base-modal'
export { getDocumentIcon } from './icons'
export { KnowledgeBaseContextMenu } from './knowledge-base-context-menu'
export { KnowledgeHeader } from './knowledge-header'
export { KnowledgeListContextMenu } from './knowledge-list-context-menu'

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client'

import { Table as TableIcon } from '@/components/emcn'
import { Table as TableIcon } from '@/components/emcn/icons'
import {
type BreadcrumbItem,
ResourceChromeFallback,
Expand Down
57 changes: 30 additions & 27 deletions apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { ColumnDefinition, Filter, TableRow as TableRowType, WorkflowGroup
import { getColumnId } from '@/lib/table/column-keys'
import { TABLE_LIMITS } from '@/lib/table/constants'
import {
type BreadcrumbItem,
type ColumnOption,
Resource,
type SortConfig,
Expand Down Expand Up @@ -483,34 +484,36 @@ export function Table({
}

const breadcrumbs = useMemo(
() => [
(): BreadcrumbItem[] => [
{ label: 'Tables', onClick: handleNavigateBack },
{
label: tableData?.name ?? '',
editing: tableHeaderRename.editingId
? {
isEditing: true,
value: tableHeaderRename.editValue,
onChange: tableHeaderRename.setEditValue,
onSubmit: tableHeaderRename.submitRename,
onCancel: tableHeaderRename.cancelRename,
}
: undefined,
dropdownItems: [
{
label: 'Rename',
icon: Pencil,
disabled: !tableData,
onClick: handleStartTableRename,
},
{
label: 'Delete',
icon: Trash,
disabled: !tableData,
onClick: onRequestDeleteTable,
},
],
},
// While the table loads, mirror this route's loading.tsx (terminal "…" crumb)
// so no empty-label / orphaned-chevron frame renders in between.
tableData
? {
label: tableData.name,
editing: tableHeaderRename.editingId
? {
isEditing: true,
value: tableHeaderRename.editValue,
onChange: tableHeaderRename.setEditValue,
onSubmit: tableHeaderRename.submitRename,
onCancel: tableHeaderRename.cancelRename,
}
: undefined,
dropdownItems: [
{
label: 'Rename',
icon: Pencil,
onClick: handleStartTableRename,
},
{
label: 'Delete',
icon: Trash,
onClick: onRequestDeleteTable,
},
],
}
: { label: '…', terminal: true },
],
[
handleNavigateBack,
Expand Down
3 changes: 2 additions & 1 deletion apps/sim/app/workspace/[workspaceId]/tables/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use client'

import { Plus, Table as TableIcon, Upload } from '@/components/emcn'
import { Plus, Upload } from '@/components/emcn'
import { Table as TableIcon } from '@/components/emcn/icons'
import {
type ChromeActionSpec,
ResourceChromeFallback,
Expand Down
7 changes: 7 additions & 0 deletions apps/sim/components/emcn/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export * from './components'
/**
* `Table` exists in BOTH `./components` (data-table element) and `./icons`
* (glyph). This explicit re-export resolves the ambiguity to the COMPONENT —
* always import the icon from `@/components/emcn/icons`. Rendering the
* component as an icon paints an empty `w-full` table that squeezes its
* siblings (shipped as the tables-header "T…" flicker).
*/
export {
Table,
TableBody,
Expand Down
Loading