Skip to content

refactor: Move Panel into @deephaven/dashboard#2304

Merged
mofojed merged 6 commits intodeephaven:mainfrom
mofojed:panel-refactor
Jun 12, 2025
Merged

refactor: Move Panel into @deephaven/dashboard#2304
mofojed merged 6 commits intodeephaven:mainfrom
mofojed:panel-refactor

Conversation

@mofojed
Copy link
Copy Markdown
Member

@mofojed mofojed commented Nov 27, 2024

  • Move Panel into @deephaven/dashboard, removing functionality depending on core plugins and keeping in CorePanel in the dashboard-core-plugins package
  • Should be no breaking changes, as dashboard-core-plugins re-exports the components that were removed
  • Allows plugins (such as deephaven.ui) to simply use the Panel component without having to depend on other core plugins
  • Tests pass, ran a smoke test with latest version of deephaven.ui to ensure functionality still worked
  • Tested from Enterprise as well against the latest G+, was able to open table panels and deephaven.ui panels without any changes to Enterprise code.

@mofojed mofojed requested a review from mattrunyon November 27, 2024 15:41
@mofojed mofojed self-assigned this Nov 27, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 9 lines in your changes missing coverage. Please review.

Project coverage is 47.24%. Comparing base (9de971f) to head (d27cb92).

Files with missing lines Patch % Lines
...es/dashboard-core-plugins/src/panels/CorePanel.tsx 67.85% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2304      +/-   ##
==========================================
- Coverage   47.31%   47.24%   -0.07%     
==========================================
  Files         723      726       +3     
  Lines       39772    39785      +13     
  Branches    10144     9955     -189     
==========================================
- Hits        18819    18798      -21     
- Misses      20899    20976      +77     
+ Partials       54       11      -43     
Flag Coverage Δ
unit 47.24% <72.72%> (-0.07%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread packages/dashboard-core-plugins/src/events/index.ts Outdated
@@ -0,0 +1,80 @@
import React, { PureComponent, type ReactElement } from 'react';
import { createXComponent } from '@deephaven/components';
import { type BasePanelProps, Panel } from '@deephaven/dashboard';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I feel like we should either have BasePanelProps, BasePanel or PanelProps, Panel for consistency

Comment on lines +20 to +22
export { default as CorePanel } from './CorePanel';
// Deprecated - use CorePanel instead
export { default as Panel } from './CorePanel';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same comment about importing and renaming for the deprecated export w/ a deprecated tag.

CorePanel is what Panel used to be right? Why would someone need/want Panel from @deephaven/dashboard? dh.ui would still need the dashboard-core-components version, right? Or does nothing there need the session open/close events?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

deephaven.ui doesn't use the onSessionClosed or onSessionOpened props, it only needs the BasePanel

Comment thread packages/dashboard/src/Panel.tsx Outdated
@mofojed mofojed requested a review from mattrunyon January 29, 2025 17:15
mattrunyon
mattrunyon previously approved these changes Apr 28, 2025
Copy link
Copy Markdown
Collaborator

@mattrunyon mattrunyon left a comment

Choose a reason for hiding this comment

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

I assume you've tested whatever we needed again since this is an old PR that looks like we forgot about. Looks like e2e and unit tests are passing after you updated from main.

I can't remember if we were holding off this PR for any reason or if it just fell off the radar.

mofojed added 3 commits June 5, 2025 08:45
- Move Panel into @deephaven/dashboard, removing functionality depending on core plugins and keeping in CorePanel in the dashboard-core-plugins package
- Should be no breaking changes, as dashboard-core-plugins re-exports the components that were removed
- Allows plugins (such as deephaven.ui) to simply use the `Panel` component without having to depend on other core plugins
- Was exporting it incorrectly, causing a breaking change. This way it appears correctly as "deprecated" instead of breaking
@mofojed
Copy link
Copy Markdown
Member Author

mofojed commented Jun 5, 2025

@mattrunyon I retested and rebased this. Found one issue with TabEvent deprecated export in dashboard-core-plugins, should be resolved now with no breaking changes.

Comment thread packages/dashboard-core-plugins/src/panels/CorePanel.tsx Outdated
Comment thread packages/dashboard/src/Panel.tsx Outdated
Comment thread packages/dashboard/src/index.ts Outdated
@mofojed mofojed requested a review from mattrunyon June 12, 2025 16:59
@mofojed mofojed merged commit 31d0ebb into deephaven:main Jun 12, 2025
10 of 11 checks passed
@mofojed mofojed deleted the panel-refactor branch June 12, 2025 17:54
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 12, 2025
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