fix: DH-17292 Handle disconnect from GridWidgetPlugin
- When the model is disconnected, we should just display an error. There's no option to reconnect, as the widget schema could change entirely
- By unloading the IrisGrid component, it's no longer throwing an error by trying to access table methods after a table.close()
- Fixes DH-17292 from Enterprise
- Tested using the steps in the description
And possibly PandasWidgetPlugin, but not sure if that model emits disconnects
I checked w/ Figure() in DHE and it doesn't seem to have the same issue.
It does show a stale chart until the new widget is loaded though. That could be handled in a separate ticket
@mattrunyon Figure (and Table/Pandas Table) and everything in deephaven.ui should be displaying the error panel with https://github.com/deephaven-ent/iris/pull/1822 and the latest v0.15 deephaven.ui. So not too worried if there's a stale chart shown behind that error.
I'll add it to the PandasWidgetPlugin as well though so we don't throw errors.
Having a hard time debugging the Pandas thing because of a Pandas Enterprise issue: https://deephaven.atlassian.net/issues/DH-17081 I'll submit a fix for that first...
Now that we no longer show the widget after a disconnect/error (https://github.com/deephaven/deephaven-plugins/pull/585) this PR is no longer relevant and will be closed.
Actually I realized there's some refactoring here (useIrisGridModel) which cleans some things up and could still be merged, so keeping it open.