Skip to content

Conversation

@mofojed
Copy link
Member

@mofojed mofojed commented Feb 15, 2024

  • Until we have support for Persist multiple dashboards #1746 , load the default dashboard data from workspace
    • Needed for testing the widget hydration PR
  • Tested with my changes for widget hydration
    • Ensured deephaven.ui widgets re-opened upon refresh
    • Ensured links remained between existing tables

- We need to store the Dashboard data in dashboard storage which doesn't exist in Community
- Needed to load filterSets and links from there still
- There's a different layout for each dashboard, so store the map of them that we're listening to
@codecov
Copy link

codecov bot commented Feb 15, 2024

Codecov Report

Attention: Patch coverage is 28.20513% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 45.98%. Comparing base (e1c1585) to head (0bdd7c3).
Report is 14 commits behind head on main.

Files Patch % Lines
packages/code-studio/src/main/AppMainContainer.tsx 31.03% 20 Missing ⚠️
packages/dashboard/src/DashboardEvents.ts 0.00% 3 Missing ⚠️
packages/dashboard/src/redux/hooks.ts 0.00% 3 Missing ⚠️
...s/code-studio/src/storage/LocalWorkspaceStorage.ts 0.00% 1 Missing ⚠️
packages/dashboard/src/redux/selectors.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1810      +/-   ##
==========================================
- Coverage   46.05%   45.98%   -0.08%     
==========================================
  Files         628      631       +3     
  Lines       37771    37862      +91     
  Branches     9512     9535      +23     
==========================================
+ Hits        17394    17409      +15     
- Misses      20323    20399      +76     
  Partials       54       54              
Flag Coverage Δ
unit 45.98% <28.20%> (-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.

Comment on lines +5 to +8
export interface CreateDashboardPayload<T = unknown> {
pluginId: string;
title: string;
data: unknown;
data: T;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the generic? The data comes from the plugin and we only really care it's serializable

Copy link
Member Author

Choose a reason for hiding this comment

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

So the listen/emit events can add typing for payload. For the emit function which will come from the plugin, can add typing so we know we're not passing a malformed payload.

@mofojed mofojed requested a review from mattrunyon February 26, 2024 18:42
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.

Looks good. I think we should wait until the plugin side of this change is also ready in case there are any more generics/type changes that are needed

mofojed added a commit to deephaven/deephaven-plugins that referenced this pull request Feb 28, 2024
- Reload widgets on dashboard reload
- Needs my draft PR that stores default dashboard data with the
workspace for this to work
(deephaven/web-client-ui#1810)
- Opened deephaven.ui widgets from the examples, then refreshed the
page. Widgets re-opened in the same positions/panels they were in.
Widget internal state (such as input in a text field, or filter set on a
table) and ui.dashboards do _not_ re-hydrate correctly yet
- ui.dashboard will do after dashboard storage is properly done, but
that shouldn't be needed for this to work in Enterprise
- Fixes #160 
- Fixes #161  
- Fixes #162
@mofojed mofojed merged commit 6dd9814 into deephaven:main Feb 28, 2024
@mofojed mofojed deleted the dashboard-storage branch February 28, 2024 19:25
@github-actions github-actions bot locked and limited conversation to collaborators Feb 28, 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