Skip to content

Commit aeb7796

Browse files
authored
fix: Version bump + loading spinner fixes (#243)
- DHC version bump - Fixed infinite loading spinner fixes #241
1 parent 3e24a20 commit aeb7796

9 files changed

Lines changed: 1404 additions & 724 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ tsconfig.tsbuildinfo
1313
.tox/
1414

1515
.eslintcache
16+
.jest-cache
1617
.stylelintcache
1718

1819
# Ignore the test reports

package-lock.json

Lines changed: 1371 additions & 710 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugins/plotly-express/src/js/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"build": "tsc && vite build"
3636
},
3737
"devDependencies": {
38-
"@deephaven/jsapi-types": "0.55.0",
38+
"@deephaven/jsapi-types": "0.62.0",
3939
"@types/deep-equal": "^1.0.1",
4040
"@types/plotly.js": "^2.12.18",
4141
"@types/plotly.js-dist-min": "^2.3.1",
@@ -50,15 +50,15 @@
5050
"react": "^17.0.2"
5151
},
5252
"dependencies": {
53-
"@deephaven/chart": "0.55.0",
54-
"@deephaven/components": "0.55.0",
55-
"@deephaven/dashboard": "0.55.0",
56-
"@deephaven/dashboard-core-plugins": "0.55.0",
57-
"@deephaven/icons": "0.55.0",
58-
"@deephaven/jsapi-bootstrap": "0.55.0",
59-
"@deephaven/log": "0.55.0",
60-
"@deephaven/plugin": "0.55.0",
61-
"@deephaven/utils": "0.55.0",
53+
"@deephaven/chart": "0.62.0",
54+
"@deephaven/components": "0.62.0",
55+
"@deephaven/dashboard": "0.62.0",
56+
"@deephaven/dashboard-core-plugins": "0.62.0",
57+
"@deephaven/icons": "0.62.0",
58+
"@deephaven/jsapi-bootstrap": "0.62.0",
59+
"@deephaven/log": "0.62.0",
60+
"@deephaven/plugin": "0.62.0",
61+
"@deephaven/utils": "0.62.0",
6262
"deep-equal": "^2.2.1",
6363
"plotly.js": "^2.23.0",
6464
"plotly.js-dist-min": "^2.23.0",

plugins/plotly-express/src/js/src/PlotlyExpressChart.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import React, { useEffect, useRef, useState } from 'react';
22
import Plotly from 'plotly.js-dist-min';
33
import { Chart } from '@deephaven/chart';
4+
import type { Widget } from '@deephaven/jsapi-types';
45
import { type WidgetComponentProps } from '@deephaven/plugin';
56
import { useApi } from '@deephaven/jsapi-bootstrap';
67
import PlotlyExpressChartModel from './PlotlyExpressChartModel.js';
78
import { useHandleSceneTicks } from './useHandleSceneTicks.js';
89

910
export function PlotlyExpressChart(
10-
props: WidgetComponentProps
11+
props: WidgetComponentProps<Widget>
1112
): JSX.Element | null {
1213
const dh = useApi();
1314
const { fetch } = props;

plugins/plotly-express/src/js/src/PlotlyExpressChartModel.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ export class PlotlyExpressChartModel extends ChartModel {
101101

102102
hasPendingUpdate = false;
103103

104+
hasInitialLoadCompleted = false;
105+
104106
override getData(): Partial<Data>[] {
105107
const hydratedData = [...this.plotlyData];
106108

@@ -329,6 +331,15 @@ export class PlotlyExpressChartModel extends ChartModel {
329331
override fireUpdate(data: unknown): void {
330332
super.fireUpdate(data);
331333
this.hasPendingUpdate = false;
334+
335+
// TODO: This will fire on first call to `fireUpdate` even though other data
336+
// may still be loading. We should consider making this smarter to fire after
337+
// all initial data has loaded.
338+
// https://github.com/deephaven/deephaven-plugins/issues/267
339+
if (!this.hasInitialLoadCompleted) {
340+
this.fireLoadFinished();
341+
this.hasInitialLoadCompleted = true;
342+
}
332343
}
333344

334345
pauseUpdates(): void {

plugins/plotly-express/src/js/src/PlotlyExpressChartPanel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import React, { useCallback, useRef, useState } from 'react';
22
import Plotly from 'plotly.js-dist-min';
33
import { ChartPanel, ChartPanelProps } from '@deephaven/dashboard-core-plugins';
4+
import type { Widget } from '@deephaven/jsapi-types';
45
import { type WidgetPanelProps } from '@deephaven/plugin';
56
import { useApi } from '@deephaven/jsapi-bootstrap';
67
import PlotlyExpressChartModel from './PlotlyExpressChartModel.js';
78
import { useHandleSceneTicks } from './useHandleSceneTicks.js';
89

9-
export function PlotlyExpressChartPanel(props: WidgetPanelProps) {
10+
export function PlotlyExpressChartPanel(props: WidgetPanelProps<Widget>) {
1011
const dh = useApi();
1112
const { fetch, metadata = {}, ...rest } = props;
1213
const containerRef = useRef<HTMLDivElement>(null);

plugins/plotly-express/src/js/src/PlotlyExpressPlugin.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { type WidgetPlugin, PluginType } from '@deephaven/plugin';
22
import { vsGraph } from '@deephaven/icons';
3+
import type { Widget } from '@deephaven/jsapi-types';
34
import { PlotlyExpressChart } from './PlotlyExpressChart.js';
45
import { PlotlyExpressChartPanel } from './PlotlyExpressChartPanel.js';
56

6-
export const PlotlyExpressPlugin: WidgetPlugin = {
7+
export const PlotlyExpressPlugin: WidgetPlugin<Widget> = {
78
name: '@deephaven/plotly-express',
89
type: PluginType.WIDGET_PLUGIN,
910
supportedTypes: 'deephaven.plot.express.DeephavenFigure',

plugins/plotly-express/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ isolated_build = True
33

44
[testenv]
55
deps =
6-
deephaven-server>=0.29.0
6+
deephaven-server==0.31.0
77
commands =
88
python -m unittest discover

plugins/ui/src/js/src/DocumentHandler.test.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,17 @@ beforeEach(() => {
5555
});
5656

5757
it('should throw an error if no children to render', () => {
58+
TestUtils.disableConsoleOutput();
59+
5860
const children = makeDocument();
5961
expect(() => render(makeDocumentHandler({ children }))).toThrow(
6062
NoChildrenError
6163
);
6264
});
6365

6466
it('should throw an error if the document mixes panel and non-panel elements', () => {
67+
TestUtils.disableConsoleOutput();
68+
6569
const children = makeDocument([
6670
makeElement(PANEL_ELEMENT_NAME),
6771
makeElement('not panel element'),

0 commit comments

Comments
 (0)