Skip to content

Commit c2fd5e0

Browse files
committed
fixes
Signed-off-by: Robert Kruszewski <github@robertk.io>
1 parent 3b4da1d commit c2fd5e0

20 files changed

Lines changed: 89 additions & 84 deletions

vortex-web/src/components/DataTable.tsx

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -329,28 +329,26 @@ export function DataTable({
329329
<span className="text-vortex-grey-dark tabular-nums">{info.row.index}</span>
330330
),
331331
},
332-
...columns.map(
333-
(col): ColumnDef<Record<string, unknown>> => ({
334-
accessorKey: col,
335-
header: () => (
336-
<ColumnHeader name={col} stats={columnStats[col]} approximate={approximate} />
337-
),
338-
cell: (info) => {
339-
const renderer = cellRenderers?.[col];
340-
if (renderer) {
341-
return renderer(info.getValue(), info.row.original);
342-
}
343-
const val = info.getValue();
344-
if (val == null) {
345-
return <span className="text-vortex-grey-dark italic">null</span>;
346-
}
347-
return formatCell(val);
348-
},
349-
sortingFn: 'auto',
350-
}),
351-
),
332+
...columns.map((col): ColumnDef<Record<string, unknown>> => ({
333+
accessorKey: col,
334+
header: () => (
335+
<ColumnHeader name={col} stats={columnStats[col]} approximate={approximate} />
336+
),
337+
cell: (info) => {
338+
const renderer = cellRenderers?.[col];
339+
if (renderer) {
340+
return renderer(info.getValue(), info.row.original);
341+
}
342+
const val = info.getValue();
343+
if (val == null) {
344+
return <span className="text-vortex-grey-dark italic">null</span>;
345+
}
346+
return formatCell(val);
347+
},
348+
sortingFn: 'auto',
349+
})),
352350
],
353-
[columns, columnStats],
351+
[approximate, cellRenderers, columns, columnStats],
354352
);
355353

356354
const table = useReactTable({

vortex-web/src/components/ThemePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
import type React from 'react';
5-
import { useTheme, type ThemeChoice } from '../contexts/ThemeContext';
5+
import { useTheme, type ThemeChoice } from '../contexts/ThemeContextCore';
66

77
const cycle: ThemeChoice[] = ['dark', 'light', 'system'];
88

vortex-web/src/components/detail/BuffersPane.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { useCallback, useEffect, useMemo, useState } from 'react';
55
import type { LayoutTreeNode } from '../swimlane/types';
66
import { formatBytes, parseArrayNodeId } from '../swimlane/utils';
7-
import { useVortexFile } from '../../contexts/VortexFileContext';
7+
import { useVortexFile } from '../../contexts/VortexFileContextCore';
88

99
interface BuffersPaneProps {
1010
node: LayoutTreeNode;

vortex-web/src/components/detail/DetailPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
import { useMemo, useState } from 'react';
5-
import { useVortexFile } from '../../contexts/VortexFileContext';
6-
import { useSelection } from '../../contexts/SelectionContext';
5+
import { useVortexFile } from '../../contexts/VortexFileContextCore';
6+
import { useSelection } from '../../contexts/SelectionContextCore';
77
import {
88
getNodeDisplayName,
99
findPathToNode,

vortex-web/src/components/detail/EncodingPane.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

44
import { useEffect, useState } from 'react';
5-
import { useVortexFile } from '../../contexts/VortexFileContext';
5+
import { useVortexFile } from '../../contexts/VortexFileContextCore';
66
import type { LayoutTreeNode, ArrayEncodingNode } from '../swimlane/types';
77
import { shortEncoding, formatBytes } from '../swimlane/utils';
88

vortex-web/src/components/detail/SegmentsPane.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import { useCallback, useMemo } from 'react';
55
import type { LayoutTreeNode, SegmentMapEntry } from '../swimlane/types';
66
import { collectSubtreeSegments, findPathToNode, getNodeDisplayName } from '../swimlane/utils';
7-
import { useVortexFile } from '../../contexts/VortexFileContext';
8-
import { useSelection } from '../../contexts/SelectionContext';
7+
import { useVortexFile } from '../../contexts/VortexFileContextCore';
8+
import { useSelection } from '../../contexts/SelectionContextCore';
99
import { DataTable, type CellRenderer } from '../DataTable';
1010

1111
interface SegmentsPaneProps {

vortex-web/src/components/explorer/BlockTreemap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
formatBytes,
1717
DTYPE_COLORS,
1818
} from '../swimlane/utils';
19-
import { useTheme } from '../../contexts/ThemeContext';
19+
import { useTheme } from '../../contexts/ThemeContextCore';
2020
import {
2121
nodePhysicalStats,
2222
arraySubtreeBytes,

vortex-web/src/components/explorer/DataPreview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import { useEffect, useMemo, useState } from 'react';
55
import { tableFromIPC } from 'apache-arrow';
6-
import { useSelection } from '../../contexts/SelectionContext';
7-
import { useVortexFile } from '../../contexts/VortexFileContext';
6+
import { useSelection } from '../../contexts/SelectionContextCore';
7+
import { useVortexFile } from '../../contexts/VortexFileContextCore';
88
import { parseArrayNodeId } from '../swimlane/utils';
99
import { DataTable } from '../DataTable';
1010

vortex-web/src/components/explorer/FileHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: Apache-2.0
22
// SPDX-FileCopyrightText: Copyright the Vortex contributors
33

4-
import { useVortexFile } from '../../contexts/VortexFileContext';
4+
import { useVortexFile } from '../../contexts/VortexFileContextCore';
55
import { ThemePicker } from '../ThemePicker';
66

77
interface FileHeaderProps {

vortex-web/src/components/explorer/FileMap.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
import { useRef, useEffect, useMemo, useState, useCallback } from 'react';
55
import { collectSubtreeSegments, formatBytes } from '../swimlane/utils';
6-
import { useVortexFile } from '../../contexts/VortexFileContext';
7-
import { useSelection } from '../../contexts/SelectionContext';
6+
import { useVortexFile } from '../../contexts/VortexFileContextCore';
7+
import { useSelection } from '../../contexts/SelectionContextCore';
88
import type { SegmentMapEntry } from '../swimlane/types';
99

1010
/**

0 commit comments

Comments
 (0)