-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Restrict viewer.load() to only accept Table()
#1231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f174f0b to
ed134c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PerspectiveWidget is currently broken on this branch - verified locally and through code review.
Intuitively, we should also make sure that PerspectiveWidget follows this API change - i.e. it should only __init__ or load with a table and not a dataset.
a61dfc3 to
6ab05fa
Compare
sc1f
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! This should be merged before #1240 - there will be some conflicts on that PR (in the jupyterlab plugin and tests) that I will fix after this branch is merged.
6ab05fa to
5ca5061
Compare
| */ | ||
| _update(data: TableData): void { | ||
| this.viewer.update(data); | ||
| this.viewer.table.update(data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeError: this.viewer.table is undefined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this introduces a bug as table isn't guaranteed to exist on the viewer. I don't think this was checked?
This PR removes
@finos/perspectiveas a build-time dependency of@finos/perspective-viewer, which in practice meansperspective.wasmWebAssembly binary and WebWorker JS runtime are no longer packed with the@finos/perspective-viewermodule, or any module that imports@finos/perspective-viewer. You must now also import@finos/perspectiveexplicitly.<perspective-viewer>'sload()method now only allows arguments of typeTable(), which must be created explicitly from a WebWorkerworker()or Websocketwebsocket().Table()methods on<perspective-viewer>have been removed:replace(),clear(),update(). Use e.g.viewer.table.clear()instead.