Skip to content

refactor: Move Panel into @deephaven/dashboard #2304

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

mofojed
Copy link
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

- 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
@mofojed mofojed requested a review from mattrunyon November 27, 2024 15:41
@mofojed mofojed self-assigned this Nov 27, 2024
Copy link

codecov bot commented Nov 27, 2024

Codecov Report

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

Project coverage is 46.85%. Comparing base (d6f2cff) to head (0c2db6a).

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   46.92%   46.85%   -0.08%     
==========================================
  Files         712      714       +2     
  Lines       39347    39359      +12     
  Branches     9840     9840              
==========================================
- Hits        18463    18441      -22     
- Misses      20873    20907      +34     
  Partials       11       11              
Flag Coverage Δ
unit 46.85% <70.96%> (-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.

🚀 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.

@@ -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
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
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
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

@mofojed mofojed requested a review from mattrunyon January 29, 2025 17:15
Copy link
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants