Upgrade to Material-UI v7 and React 19 (#954)

This commit is contained in:
Copilot
2025-12-22 21:03:46 +01:00
committed by GitHub
parent eb605a884c
commit a143c5fb45
11 changed files with 292 additions and 197 deletions

View File

@@ -41,31 +41,29 @@ function ChartPreview(props: Props) {
const addChartToPanelButton = hasEnoughDataToDisplayDiagrams ? (
<Tooltip title="Add to chart panel">
<ShowChart
<span
ref={chartIconRef}
className={props.classes.icon}
onMouseEnter={mouseOver}
onMouseLeave={mouseOut}
onClick={onClick}
data-test-type="ShowChart"
data-test={props.literal.path}
/>
style={{ cursor: 'pointer', display: 'inline-flex' }}
>
<ShowChart className={props.classes.icon} />
</span>
</Tooltip>
) : (
<Tooltip title="Add to chart panel, not enough data for preview">
<ShowChart
onClick={onClick}
className={props.classes.icon}
style={{ color: '#aaa' }}
data-test-type="ShowChart"
data-test={props.literal.path}
/>
<span onClick={onClick} style={{ cursor: 'pointer', display: 'inline-flex' }}>
<ShowChart className={props.classes.icon} style={{ color: '#aaa' }} />
</span>
</Tooltip>
)
return (
<span>
{addChartToPanelButton}
<div style={{ display: 'inline' }}>
<span data-test-type="ShowChart" data-test={props.literal.path} style={{ display: 'inline-block' }}>
{addChartToPanelButton}
</span>
<Popper open={open} anchorEl={chartIconRef.current} placement="left-end">
<Fade in={open} timeout={300}>
<Paper style={{ width: '300px' }}>
@@ -77,7 +75,7 @@ function ChartPreview(props: Props) {
</Paper>
</Fade>
</Popper>
</span>
</div>
)
}

View File

@@ -1,8 +1,8 @@
import React, { useCallback } from 'react'
import Code from '@mui/icons-material/Code'
import Reorder from '@mui/icons-material/Reorder'
import ToggleButton from '@mui/lab/ToggleButton'
import ToggleButtonGroup from '@mui/lab/ToggleButtonGroup'
import ToggleButton from '@mui/material/ToggleButton'
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'
import { settingsActions } from '../../../actions'
import { Tooltip } from '@mui/material'
import { withStyles } from '@mui/styles'