Skip to content

feat: Core plugins refactor, XComponent framework#2150

Merged
mofojed merged 4 commits intodeephaven:mainfrom
mofojed:core-plugins-refactor-merge-to-main-2
Jul 17, 2024
Merged

feat: Core plugins refactor, XComponent framework#2150
mofojed merged 4 commits intodeephaven:mainfrom
mofojed:core-plugins-refactor-merge-to-main-2

Conversation

@mofojed
Copy link
Copy Markdown
Member

@mofojed mofojed commented Jul 16, 2024

  • Add XComponent (eXtendable Component) framework to allow components to be wrapped/replaced
    • Similar to Swizzling in Docusaurus
    • Useful for components that we need to replace at the Enterprise level (e.g. WidgetPanelTooltip needs to display the query name in Enterprise)
    • Added to the StyleGuide
  • Pass a VariableDescriptor to WidgetPanel and WidgetPanelTooltip
    • Allows for more information to be included, e.g. a QueryVariableDescriptor which extends VariableDescriptor
  • Refactor the Core plugins to be consistent in how they handle the PanelEvent.OPEN event
    • Will allow Enterprise to use these plugins straight up and remove their duplicated panel code
  • Add functions for PanelEvent.OPEN
    • Instead of using PanelEvent.OPEN directly and not getting any type safety, add functions for emitting, listening, and a hook to enforce type safety

mofojed added 2 commits July 16, 2024 16:27
…deephaven#1981)

- Add XComponent (eXtendable Component) framework to allow components to
be wrapped/replaced
  - Similar to Swizzling in Docusaurus
- Useful for components that we need to replace at the Enterprise level
(e.g. `WidgetPanelTooltip` needs to display the query name in
Enterprise)
- Pass a `VariableDescriptor` to `WidgetPanel` and `WidgetPanelTooltip`
- Allows for more information to be included, e.g. a
`QueryVariableDescriptor` which extends `VariableDescriptor`
- Tested with branch `bender_DH-16263-core-plugins` on Enterprise
- Instead of using PanelEvent.OPEN directly and not getting any type
safety, add functions for emitting, listening, and a hook to enforce
type safety
- Add xcomponents to the styleguide
@mofojed mofojed requested a review from mattrunyon July 16, 2024 20:35
@mofojed mofojed self-assigned this Jul 16, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 16, 2024

Codecov Report

Attention: Patch coverage is 75.91241% with 33 lines in your changes missing coverage. Please review.

Project coverage is 46.71%. Comparing base (58ee88d) to head (bd18082).

Files Patch % Lines
.../dashboard-core-plugins/src/panels/WidgetPanel.tsx 47.05% 9 Missing ⚠️
packages/code-studio/src/main/AppMainContainer.tsx 0.00% 6 Missing ⚠️
...ckages/dashboard-core-plugins/src/panels/Panel.tsx 75.00% 5 Missing ⚠️
...ard-core-plugins/src/panels/WidgetPanelTooltip.tsx 20.00% 4 Missing ⚠️
...ackages/code-studio/src/styleguide/XComponents.tsx 81.25% 3 Missing ⚠️
...s/dashboard-core-plugins/src/panels/ChartPanel.tsx 81.81% 2 Missing ⚠️
...dashboard-core-plugins/src/panels/ConsolePanel.tsx 0.00% 1 Missing ⚠️
...ashboard-core-plugins/src/panels/IrisGridPanel.tsx 83.33% 1 Missing ⚠️
...d-core-plugins/src/panels/IrisGridPanelTooltip.tsx 0.00% 1 Missing ⚠️
packages/dashboard/src/layout/useDashboardPanel.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2150      +/-   ##
==========================================
+ Coverage   46.62%   46.71%   +0.08%     
==========================================
  Files         685      690       +5     
  Lines       38493    38527      +34     
  Branches     9589     9789     +200     
==========================================
+ Hits        17948    17997      +49     
+ Misses      20535    20520      -15     
  Partials       10       10              
Flag Coverage Δ
unit 46.71% <75.91%> (+0.08%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

mattrunyon
mattrunyon previously approved these changes Jul 17, 2024
- Fixes some issues on Enterprise where query or session information was dropped
@mofojed mofojed merged commit 2571fad into deephaven:main Jul 17, 2024
@mofojed mofojed deleted the core-plugins-refactor-merge-to-main-2 branch July 17, 2024 18:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 17, 2024
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