Skip to content

feat: De-globalize JSAPI in Chart package#1258

Merged
vbabich merged 14 commits intodeephaven:mainfrom
vbabich:jsapi-deglobalize-chart
May 8, 2023
Merged

feat: De-globalize JSAPI in Chart package#1258
vbabich merged 14 commits intodeephaven:mainfrom
vbabich:jsapi-deglobalize-chart

Conversation

@vbabich
Copy link
Copy Markdown
Collaborator

@vbabich vbabich commented May 2, 2023

  • De-globalize JSAPI in the Chart package.
  • Update dashboard-core-plugins to match the Chart package changes.

BREAKING CHANGE:

  • ChartUtils class now needs to be instantiated with a JSAPI object, most of the methods converted from static to instance methods.
  • All ChartModelFactory methods require JSAPI object as the first argument.
  • FigureChartModel constructor requires JSAPI object as the first argument.

@vbabich vbabich requested a review from mofojed May 2, 2023 01:41
@vbabich vbabich self-assigned this May 2, 2023
@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2023

Codecov Report

Merging #1258 (9d3668f) into main (7d56f97) will increase coverage by 0.02%.
The diff coverage is 53.53%.

@@            Coverage Diff             @@
##             main    #1258      +/-   ##
==========================================
+ Coverage   45.37%   45.39%   +0.02%     
==========================================
  Files         502      502              
  Lines       34666    34706      +40     
  Branches     8675     8677       +2     
==========================================
+ Hits        15728    15754      +26     
- Misses      18887    18901      +14     
  Partials       51       51              
Flag Coverage Δ
unit 45.39% <53.53%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/chart/src/MockChartModel.js 0.00% <0.00%> (ø)
packages/code-studio/src/main/AppInit.tsx 0.00% <ø> (ø)
packages/code-studio/src/main/AppMainContainer.tsx 34.47% <0.00%> (-0.12%) ⬇️
packages/code-studio/src/main/WidgetUtils.ts 5.55% <0.00%> (ø)
.../dashboard-core-plugins/src/ChartBuilderPlugin.tsx 0.00% <0.00%> (ø)
...ackages/dashboard-core-plugins/src/ChartPlugin.tsx 48.00% <33.33%> (+0.17%) ⬆️
packages/chart/src/ChartModelFactory.ts 76.92% <50.00%> (ø)
packages/chart/src/ChartUtils.ts 64.77% <53.62%> (+0.57%) ⬆️
...s/dashboard-core-plugins/src/panels/ChartPanel.tsx 60.58% <64.70%> (-0.36%) ⬇️
packages/chart/src/FigureChartModel.ts 53.86% <73.33%> (+0.53%) ⬆️
... and 1 more

Comment thread packages/chart/src/ChartModelFactory.ts Outdated
Comment thread packages/chart/src/ChartUtils.test.ts Outdated
Comment thread packages/chart/src/ChartUtils.ts Outdated
} else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {
seriesData.textinfo = 'label+percent';

// TODO Open DefinitelyTyped/Plotly PR to mark family and size as optional
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we never opened a PR for this...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have enough information about this, who should have opened a PR?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would have been from when Tony was doing TS conversion. If you could create a ticket for it just with this comment and the link to the pie.d.ts, that would be great.

Comment thread packages/chart/src/FigureChartModel.ts
Comment thread packages/chart/src/FigureChartModel.ts Outdated
Comment thread packages/dashboard-core-plugins/src/ChartPlugin.tsx Outdated
Comment thread packages/dashboard-core-plugins/src/panels/ChartPanel.test.tsx
Comment thread packages/dashboard-core-plugins/src/panels/ChartPanel.tsx Outdated
Comment thread packages/embed-chart/src/App.tsx
Comment thread packages/dashboard-core-plugins/src/index.test.tsx
@vbabich vbabich requested a review from mofojed May 2, 2023 18:30
Comment thread packages/chart/src/ChartUtils.ts
Comment thread packages/code-studio/src/styleguide/Charts.tsx Outdated
"@deephaven/icons": "file:../icons",
"@deephaven/iris-grid": "file:../iris-grid",
"@deephaven/jsapi-bootstrap": "file:../jsapi-bootstrap",
"@deephaven/jsapi-shim": "file:../jsapi-shim",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing this in a future update... looks like the only thing that will need to be updated is the DropdownFilterPanel

Comment thread packages/dashboard-core-plugins/tsconfig.json Outdated
Comment thread packages/embed-chart/package.json
@vbabich vbabich force-pushed the jsapi-deglobalize-chart branch from 7012238 to 9d3668f Compare May 8, 2023 14:01
@vbabich vbabich requested a review from mofojed May 8, 2023 14:12
} else if (plotStyle === dh.plot.SeriesPlotStyle.PIE) {
seriesData.textinfo = 'label+percent';

// TODO Open DefinitelyTyped/Plotly PR to mark family and size as optional
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would have been from when Tony was doing TS conversion. If you could create a ticket for it just with this comment and the link to the pie.d.ts, that would be great.

@vbabich vbabich merged commit 87fa2ef into deephaven:main May 8, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators May 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants