feat: Table plugin support for GridWidgetPlugin#2478
feat: Table plugin support for GridWidgetPlugin#2478mattrunyon merged 3 commits intodeephaven:mainfrom
Conversation
mofojed
left a comment
There was a problem hiding this comment.
Good overall, I haven't actually tested it with a plugin. If you update the Test Plan on the ticket attach a built plugin to make it easy for testers.
| * @param item Golden layout content item to search for the content item | ||
| * @param searchId the ID | ||
| */ | ||
| static getContentItemById( |
There was a problem hiding this comment.
I'm surprised this didn't already exist.
There was a problem hiding this comment.
I was too. It looks like we always just used the panel or glContainer to find the item since we only accessed the GL content item from the panel component.
There was a problem hiding this comment.
It looks like we have PanelManager.getContainerByPanelId which is close. I'm going to leave this util I think because the closest we can do is the logic from that which gets the stack for the item with config containing the id, then gets the item from the stack
This also lets you get a row or column which wouldn't work with the other logic (since they're not in a stack), but I can't think of a useful reason for that.
| * The model for the table this plugin is associated with. | ||
| */ | ||
| model: IrisGridModel; | ||
| model: IrisGridTableModelTemplate; |
There was a problem hiding this comment.
Mmm at some point wish we could clean up our GridModel types. Should all be defined as types/interfaces instead of classes.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2478 +/- ##
==========================================
+ Coverage 44.54% 44.65% +0.11%
==========================================
Files 759 761 +2
Lines 42526 42597 +71
Branches 10877 10902 +25
==========================================
+ Hits 18942 19021 +79
+ Misses 23528 23520 -8
Partials 56 56
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Also fixes selection and panelState reactivity (for GridWidget, not IrisGridPanel). Could fix for IrisGridPanel here as well if desired.
Passes the panel name as
tableNamesince tables do not actually have names. Mimics thepanelprop passed to plugins to giveirisGridandgetTableNamewhich might have been previously used. Should keep most things backwards compatible unless there were other items from the panel being used.One concern I have is the filters from plugins are completely invisible to users once they are applied. They don't go to quick filters or anywhere else, just applied with no visual. This probably makes sense as a separate ticket though.
Testing
You can checkout my plugins branch https://github.com/mattrunyon/deephaven-plugins/tree/table-plugin-example and use the local JS plugin server.
Then use the following code to test (
stockswill not update the counter state since it uses theIrisGridPanelversion which doesn't update state prop to the component)