Skip to content

Commit 52611e5

Browse files
committed
upgrade hightable to 0.13.0 + adapt style. Note that more is needed (orderBy in particular)
1 parent 57dc338 commit 52611e5

File tree

5 files changed

+22
-18
lines changed

5 files changed

+22
-18
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"watch:url": "NODE_ENV=development nodemon bin/cli.js https://hyperparam.blob.core.windows.net/hyperparam/starcoderdata-js-00000-of-00065.parquet"
4848
},
4949
"dependencies": {
50-
"hightable": "0.12.1",
50+
"hightable": "0.13.0",
5151
"hyparquet": "1.9.1",
5252
"hyparquet-compressors": "1.0.0",
5353
"icebird": "0.1.8",

src/app.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'hightable/src/HighTable.css'
21
import { StrictMode } from 'react'
32
import { createRoot } from 'react-dom/client'
43
import App from './components/App.js'

src/components/viewers/ParquetView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React, { useCallback, useEffect, useState } from 'react'
44
import { RoutesConfig, appendSearchParams } from '../../lib/routes.js'
55
import { FileSource } from '../../lib/sources/types.js'
66
import { parquetDataFrame } from '../../lib/tableProvider.js'
7+
import classes from '../../styles/ParquetView.module.css'
78
import { Spinner } from '../Layout.js'
89
import CellPanel from './CellPanel.js'
910
import ContentHeader, { ContentSize } from './ContentHeader.js'
@@ -100,7 +101,9 @@ export default function ParquetView({ source, setProgress, setError, config }: V
100101
data={content.dataframe}
101102
onDoubleClickCell={onDoubleClickCell}
102103
onMouseDownCell={onMouseDownCell}
103-
onError={setError} />}
104+
onError={setError}
105+
className={classes.hightable}
106+
/>}
104107

105108
{isLoading && <div className='center'><Spinner /></div>}
106109
</ContentHeader>

src/styles/ParquetView.module.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/* table overrides */
2+
.hightable {
3+
/* table corner */
4+
thead td:first-child {
5+
background: url("https://hyperparam.app/assets/table/hyperparam.svg")
6+
#f9f4ff no-repeat center 6px;
7+
}
8+
/* cells */
9+
tbody td {
10+
cursor: pointer;
11+
}
12+
/* row numbers */
13+
tbody tr:hover [role="rowheader"] {
14+
background-color: #ccd;
15+
border-right: 1px solid #ccc;
16+
}
17+
}

src/styles/app.css

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,6 @@ li {
5656
height: 100vh;
5757
}
5858

59-
/* table overrides */
60-
.table-container .table-corner {
61-
background: url('https://hyperparam.app/assets/table/hyperparam.svg') #f9f4ff no-repeat center 6px;
62-
}
63-
main .table-container .table th {
64-
background-color: #f1f1f3;
65-
}
66-
main .table td {
67-
cursor: pointer;
68-
}
69-
main .table tbody tr:hover th:first-child {
70-
background-color: #ccd;
71-
border-right: 1px solid #ccc;
72-
}
73-
7459
/* brand logo */
7560
.brand {
7661
align-items: center;

0 commit comments

Comments
 (0)