Skip to content

feat: De-globalize utils, formatters, linker#1278

Merged
mofojed merged 11 commits intodeephaven:mainfrom
vbabich:jsapi-deglobalize-utils
May 10, 2023
Merged

feat: De-globalize utils, formatters, linker#1278
mofojed merged 11 commits intodeephaven:mainfrom
vbabich:jsapi-deglobalize-utils

Conversation

@vbabich
Copy link
Copy Markdown
Collaborator

@vbabich vbabich commented May 8, 2023

  • De-globalize JSAPI in the jsapi-utils package. Update all dependent packages.

BREAKING CHANGE:

  • Class Formatter requires the JSAPI instance as the first argument.
  • Classes DateTimeColumnFormatter, DecimalColumnFormatter, IntegerColumnFormatter, TableColumnFormatter: static method isValid and constructor require the JSAPI instance in the first argument.
  • Component Chart requires the JSAPI instance passed in the new prop dh.
  • WidgetUtils: methods createChartModel, createGridModel methods require the JSAPI instance passed in the first argument.
  • Components DateTimeOptions, TableInput, useViewportData have to be wrapped in ApiContext.Provider passing the JSAPI instance.
  • SettingsUtils: methods isValidFormat and isFormatRuleValidForSave require the JSAPI instance passed in the first argument.
  • SessionUtils: methods createConnection, createCoreClient require the JSAPI instance passed in the first argument.
  • TableUtils static methods applyCustomColumns, applyFilter, applyNeverFilter, applySort converted to instance methods.
  • Components DropdownFilterPanel, Linker now get the JSAPI instance from redux store.
  • DecimalFormatContextMenu.getOptions, IntegerFormatContextMenu.getOptions now require the JSAPI instance in the first argument.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2023

Codecov Report

Merging #1278 (1445da2) into main (588cb8f) will increase coverage by 0.02%.
The diff coverage is 75.78%.

@@            Coverage Diff             @@
##             main    #1278      +/-   ##
==========================================
+ Coverage   45.43%   45.46%   +0.02%     
==========================================
  Files         502      503       +1     
  Lines       34764    34799      +35     
  Branches     8679     8682       +3     
==========================================
+ Hits        15794    15820      +26     
- Misses      18919    18928       +9     
  Partials       51       51              
Flag Coverage Δ
unit 45.46% <75.78%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
packages/chart/src/Chart.tsx 0.00% <0.00%> (ø)
packages/code-studio/src/main/AppInit.tsx 0.00% <0.00%> (ø)
packages/code-studio/src/main/WidgetUtils.ts 5.55% <ø> (ø)
packages/code-studio/src/styleguide/Charts.tsx 100.00% <ø> (ø)
...kages/dashboard-core-plugins/src/linker/Linker.tsx 37.57% <0.00%> (ø)
packages/iris-grid/src/IrisGridModelFactory.ts 0.00% <0.00%> (ø)
packages/iris-grid/src/IrisGridProxyModel.ts 67.74% <0.00%> (ø)
packages/iris-grid/src/IrisGridTableModel.ts 52.66% <0.00%> (ø)
...ckages/iris-grid/src/IrisGridTableModelTemplate.ts 47.87% <0.00%> (ø)
...c/format-context-menus/DecimalFormatContextMenu.ts 18.18% <0.00%> (ø)
... and 20 more

... and 3 files with indirect coverage changes

@vbabich vbabich requested a review from mofojed May 8, 2023 22:48
Comment thread packages/dashboard-core-plugins/src/index.test.tsx Outdated
Comment thread packages/code-studio/src/main/AppMainContainer.tsx Outdated
Comment thread packages/dashboard-core-plugins/src/linker/Linker.tsx
Comment thread packages/code-studio/src/settings/ColumnSpecificSectionContent.tsx
Comment thread packages/code-studio/src/settings/DateTimeOptions.tsx Outdated
Comment thread packages/code-studio/src/settings/SettingsMenu.tsx Outdated
Comment thread packages/dashboard-core-plugins/src/LinkerPlugin.tsx Outdated
Comment thread packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.tsx Outdated
Comment thread packages/dashboard-core-plugins/src/panels/DropdownFilterPanel.tsx Outdated
Comment thread packages/jsapi-utils/src/TableUtils.test.ts
@vbabich vbabich requested a review from mofojed May 9, 2023 20:11
Copy link
Copy Markdown
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

Looks good, just need to update the breaking change list.

@vbabich
Copy link
Copy Markdown
Collaborator Author

vbabich commented May 9, 2023

Updated breaking changes list, fixed wrong jsapi-types dependency in package.json, added missing import type.

@vbabich vbabich requested a review from mofojed May 9, 2023 22:23
@mofojed mofojed merged commit cb0e9ba into deephaven:main May 10, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators May 10, 2023
@vbabich vbabich deleted the jsapi-deglobalize-utils branch May 10, 2023 14:56
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