Skip to content

feat: DH-21757: WidgetPlugin support in deephaven.ui#1341

Open
mofojed wants to merge 27 commits intodeephaven:mainfrom
mofojed:DH-21757-resolve-deephaven.ui-widget-plugin
Open

feat: DH-21757: WidgetPlugin support in deephaven.ui#1341
mofojed wants to merge 27 commits intodeephaven:mainfrom
mofojed:DH-21757-resolve-deephaven.ui-widget-plugin

Conversation

@mofojed
Copy link
Copy Markdown
Member

@mofojed mofojed commented Apr 27, 2026

  • WidgetPlugin just registers directly
    • Allows for nested ui.resolve deephaven.ui components
  • Still maintain DashboardPlugin to handle legacy behaviour
  • Works with the ui_home_screen, nested dashboards, etc
  • Styling a little bit different (ui.panel is automatically wrapped in a nested dashboard rather than opening up panels in the existing dashboard like before)
    • Keeps all components contained to a panel, rather than mixing with other components in the same dashboard
  • Dashboard now has a show_headers option that can be set to False to not show headers on a dashboard. Useful if you're doing a homescreen type dashboard

mofojed added 12 commits April 27, 2026 09:40
- Needs deephaven/web-client-ui#2648
- WidgetPlugin just registers directly
  - Allows for nested ui.resolve deephaven.ui components
- Still maintain DashboardPlugin to handle legacy behaviour
- Works with the ui_home_screen, nested dashboards, etc
- Styling a little bit different (ui.panel is automatically wrapped in a nested dashboard rather than opening up panels in the existing dashboard like before)
- Dashboard now has a `show_headers` option that can be set to False to not show headers on a dashboard. Useful if you're doing a homescreen type dashboard
- Add moduleNameMapper in jest.config.cjs to resolve React 18 from the
  plugin's local node_modules, fixing dual-React-instance errors
- Mock usePersistentState in @deephaven/plugin mock to avoid FiberProvider
  dependency in tests
- Update DocumentHandler test to reflect new behavior where non-layout
  children are rendered directly without ReactPanel wrapping
- Wrap bare (non-layout) widget children in DefaultPanelContent so they
  receive padding and surface widget loading/error states (fixes the
  ui_boom_counter error overlay not appearing after the WidgetPlugin
  refactor).
- Add a styles.scss rule that strips the outer ReactPanel padding when
  its only child is a .dh-nested-dashboard, eliminating the duplicate
  padding around nested dashboards (e.g. ui_deeply_nested_dashboard).
- There's an issue here - when the ui.dashboard is the othermost thing, it should just take over the outer dashboard. Right now it's embeddign in. Need to fix that.
When a deephaven.ui widget is a single ui.panel hosted by the core
WidgetPanel (e.g. opened via the WidgetPlugin in a code studio or in
the embed widget scenario), render the panel's children inline using
DefaultPanelContent instead of opening another GoldenLayout panel.
Previously this produced a panel tab nested inside another panel tab.

DefaultPanelContent now forwards the same View/Flex props that
ReactPanel accepts so the user's ui.panel styling (padding, direction,
gap, etc.) is preserved when rendered inline, and applies the
dh-react-panel/dh-inner-react-panel class names so existing CSS rules
(grid/chart padding strip, etc.) still apply.

Also scope the nested-dashboard padding rule to .dh-react-panel so the
outer WidgetPanel does not add extra padding around a top-level
ui.dashboard in the embed widget scenario.
@mofojed mofojed self-assigned this Apr 27, 2026
@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

- now we don't have padding on the dashboard in the embed widget app scenario
@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@mofojed mofojed marked this pull request as ready for review April 29, 2026 15:36
@mofojed mofojed requested review from a team and removed request for a team April 29, 2026 15:36
@mofojed mofojed requested a review from vbabich April 29, 2026 15:36
@github-actions
Copy link
Copy Markdown

ui docs preview (Available for 14 days)

@mofojed mofojed force-pushed the DH-21757-resolve-deephaven.ui-widget-plugin branch from 96a9770 to 1fe9308 Compare May 4, 2026 18:45
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

ui docs preview (Available for 14 days)

- For the render-all pages, just load that widget up directly instead of opening it up in a nested panel.
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

ui docs preview (Available for 14 days)

mofojed added 3 commits May 4, 2026 21:34
- This is consistent with how panels are opened in a dashboard without specifying a column or row (e.g. ui.dashboard([ui.panel(..), ui.panel(...)])).
  - Before it would just stack multiple panels when opening from a code studio, which was weird
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

ui docs preview (Available for 14 days)

@mofojed
Copy link
Copy Markdown
Member Author

mofojed commented May 5, 2026

I'm not sure why the "UI Table responds to props changes" tests have slightly changed. I need to look into this a bit to understand why.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

ui docs preview (Available for 14 days)

- In the ui_home_screen.py, we were re-declaring `_stocks` to be another variable, and were not using a ticking table
- The ticking table was causing the snapshots to not match
- This kind of points to an issue with app mode in general, where we need to be concious we're not overwriting other variables in other files. I'm choosing to ignore that at this time
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

ui docs preview (Available for 14 days)

Copy link
Copy Markdown
Contributor

@dsmmcken dsmmcken left a comment

Choose a reason for hiding this comment

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

Needs some docs, at least for the show headers

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