feat: DH-21757: WidgetPlugin support in deephaven.ui#1341
Open
mofojed wants to merge 27 commits intodeephaven:mainfrom
Open
feat: DH-21757: WidgetPlugin support in deephaven.ui#1341mofojed wants to merge 27 commits intodeephaven:mainfrom
mofojed wants to merge 27 commits intodeephaven:mainfrom
Conversation
- 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.
|
ui docs preview (Available for 14 days) |
- Shouldn't need to update all of these, there are likely some other fixes I need to do.
|
ui docs preview (Available for 14 days) |
|
ui docs preview (Available for 14 days) |
- now we don't have padding on the dashboard in the embed widget app scenario
|
ui docs preview (Available for 14 days) |
|
ui docs preview (Available for 14 days) |
|
ui docs preview (Available for 14 days) |
96a9770 to
1fe9308
Compare
|
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.
|
ui docs preview (Available for 14 days) |
- 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
- This was a fix in web-client-ui
|
ui docs preview (Available for 14 days) |
Member
Author
|
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. |
…haven.ui-widget-plugin
|
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
|
ui docs preview (Available for 14 days) |
dsmmcken
requested changes
May 5, 2026
Contributor
dsmmcken
left a comment
There was a problem hiding this comment.
Needs some docs, at least for the show headers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
show_headersoption that can be set to False to not show headers on a dashboard. Useful if you're doing a homescreen type dashboard