@@ -5,29 +5,18 @@ import React, { FC, useEffect, useRef, useState } from 'react';
55
66import {
77 Box ,
8- Button ,
98 Divider ,
109 Typography ,
1110 LinearProgress ,
12- ListItem ,
1311 Stack ,
1412 ListItemIcon ,
15- List ,
1613 Card ,
1714 IconButton ,
1815 Tooltip ,
1916 ButtonGroup ,
2017 useTheme ,
21- Drawer ,
22- ListItemButton ,
23- ListItemText ,
24- Collapse ,
25- Grow ,
26- alpha ,
2718} from '@mui/material' ;
2819
29- import embed from 'vega-embed' ;
30- import AnimateOnChange from 'react-animate-on-change'
3120import { VegaLite } from 'react-vega'
3221
3322
@@ -128,11 +117,11 @@ let SingleThreadView: FC<{
128117 let currentActiveFields = new Set ( extractActiveFields ( trigger ) )
129118 let fieldsIdentical = _ . isEqual ( previousActiveFields , currentActiveFields )
130119
131- let triggerCard = < ListItem key = { 'thread-card-trigger-box' } sx = { { padding : '0' } } >
120+ let triggerCard = < div key = { 'thread-card-trigger-box' } >
132121 < Box sx = { { flex : 1 } } /*sx={{ width: 'calc(100% - 8px)', marginLeft: 1, borderLeft: '1px dashed darkgray' }}*/ >
133122 < TriggerCard className = { selectedClassName } trigger = { trigger } hideFields = { fieldsIdentical } />
134123 </ Box >
135- </ ListItem > ;
124+ </ div > ;
136125
137126 return < Box sx = { { display : 'flex' , flexDirection : 'column' } } key = { `trigger-card-${ trigger . chartRef } ` } >
138127 { triggerCard }
@@ -165,7 +154,7 @@ let SingleThreadView: FC<{
165154 // only charts without dependency can be deleted
166155 let tableDeleteEnabled = table ?. derive && ! tables . some ( t => t . derive ?. trigger . tableId == tableId ) ;
167156
168- let colloapsedTableBox = < ListItem sx = { { padding : 0 } } >
157+ let colloapsedTableBox = < div style = { { padding : 0 } } >
169158 < Box sx = { { textTransform : 'none' , padding : 0 , minWidth : 0 , color : 'gray' } } >
170159 < Stack direction = "row" sx = { { fontSize : '12px' , fontWeight : tableId == focusedTableId ? 'bold' : 'normal' } } alignItems = "center" gap = { "2px" } >
171160 < TableRowsIcon fontSize = "inherit" sx = { { fontWeight : 'inherit' } } />
@@ -174,9 +163,9 @@ let SingleThreadView: FC<{
174163 </ Typography >
175164 </ Stack >
176165 </ Box >
177- </ ListItem > ;
166+ </ div > ;
178167
179- let regularTableBox = < ListItem ref = { relevantCharts . some ( c => c . chartId == focusedChartId ) ? scrollRef : null } sx = { { padding : '0px' } } >
168+ let regularTableBox = < div ref = { relevantCharts . some ( c => c . chartId == focusedChartId ) ? scrollRef : null } style = { { padding : '0px' } } >
180169 < Card className = { `data-thread-card ${ selectedClassName } ` } variant = "outlined"
181170 sx = { { width : '100%' , background : 'aliceblue' } }
182171 onClick = { ( ) => {
@@ -222,14 +211,14 @@ let SingleThreadView: FC<{
222211 </ ButtonGroup >
223212 </ Box >
224213 </ Card >
225- </ ListItem >
214+ </ div >
226215
227216 let chartElementProps = collapsed ? { display : 'flex' , flexWrap : 'wrap' } : { }
228217
229218 return [
230219 regularTableBox ,
231220 < Box sx = { { display : 'flex' , flexDirection : 'row' } } >
232- < Button sx = { { minWidth : '1px' , padding : '0px' , width : '17px' , flex : 'none' , display : 'flex'
221+ < div style = { { minWidth : '1px' , padding : '0px' , width : '17px' , flex : 'none' , display : 'flex'
233222 //borderLeft: '1px dashed darkgray',
234223 } } >
235224 < Box sx = { { padding :0 , width : '1px' , margin :'auto' , height : '100%' ,
@@ -238,7 +227,7 @@ let SingleThreadView: FC<{
238227 backgroundImage : 'linear-gradient(180deg, darkgray, darkgray 75%, transparent 75%, transparent 100%)' ,
239228 backgroundSize : '1px 6px, 3px 100%'
240229 } } > </ Box >
241- </ Button >
230+ </ div >
242231 < Box sx = { { flex : 1 , padding : '8px 0px' , minHeight : '8px' , ...chartElementProps } } >
243232 { releventChartElements }
244233 </ Box >
@@ -281,14 +270,14 @@ let SingleThreadView: FC<{
281270 "& .MuiDivider-wrapper" : { display : 'flex' , flexDirection : 'row' } ,
282271 "&::before, &::after" : { borderColor : 'darkgray' , borderWidth : '2px' , width : 50 } ,
283272 } } >
284- < Typography sx = { { fontSize : "10px" , fontWeight : 'bold' , color :'rgba(100, 100, 100, 0.8) ' , textTransform : 'none' } } >
273+ < Typography sx = { { fontSize : "10px" , fontWeight : 'bold' , color :'text.secondary ' , textTransform : 'none' } } >
285274 { `thread - ${ threadIdx + 1 } ` }
286275 </ Typography >
287276 </ Divider >
288277 </ Box >
289- < List sx = { { padding : '2px 4px 2px 4px' , marginTop : 0 , marginBottom : '8px' , direction : 'ltr' } } >
278+ < div style = { { padding : '2px 4px 2px 4px' , marginTop : 0 , marginBottom : '8px' , direction : 'ltr' } } >
290279 { content }
291- </ List >
280+ </ div >
292281 </ Box >
293282}
294283
@@ -480,9 +469,11 @@ export const DataThread: FC<{}> = function ({ }) {
480469 < Typography className = "view-title" component = "h2" sx = { { marginTop : "6px" } } >
481470 Data Threads
482471 </ Typography >
483- < IconButton size = { 'small' } color = "primary" disabled = { leafTables . length <= 1 } onClick = { ( ) => { setThreadDrawerOpen ( ! threadDrawerOpen ) ; } } >
484- { drawerOpen ? < ChevronLeftIcon /> : < ChevronRightIcon /> }
485- </ IconButton >
472+ < Tooltip title = { drawerOpen ? "collapse" : "expand" } >
473+ < IconButton size = { 'small' } color = "primary" disabled = { leafTables . length <= 1 } onClick = { ( ) => { setThreadDrawerOpen ( ! threadDrawerOpen ) ; } } >
474+ { drawerOpen ? < ChevronLeftIcon /> : < ChevronRightIcon /> }
475+ </ IconButton >
476+ </ Tooltip >
486477 </ Box >
487478 < Box sx = { { transition : 'width 200ms cubic-bezier(0.4, 0, 0.2, 1) 0ms' , overflow : 'auto' ,
488479 direction : 'rtl' , display : 'flex' , flex : 1 } }
0 commit comments