-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Due to the initialization of custom components:
This causes the jupyter widget initialization to fail, which results in it not being displayable:
This appears to be unavoidable as an import of @finos/perspective-viewer is now required, so it is not an option to not import perspective:
import perspective from "@finos/perspective";
// triggers component registration
import perspective_viewer from "@finos/perspective-viewer";
import SERVER_WASM from "@finos/perspective/dist/wasm/perspective-server.wasm";
import CLIENT_WASM from "@finos/perspective-viewer/dist/wasm/perspective-viewer.wasm";
// Required, otherwise perspective.table will not work
await Promise.all([perspective.init_server(fetch(SERVER_WASM)), perspective_viewer.init_client(fetch(CLIENT_WASM))]);To get my extension working, I was able to make the following change in the minified assets, which shows the problematic parts:
problem 1: https://github.com/finos/perspective/blob/a074bed2908964fbbb09f301d4a1b7157581c3c0/rust/perspective-viewer/src/rust/utils/custom_element.rs#L70
problem 2: https://github.com/finos/perspective/blob/a074bed2908964fbbb09f301d4a1b7157581c3c0/packages/perspective-viewer-datagrid/src/js/index.js#L38
problem 3:
https://github.com/finos/perspective/blob/a074bed2908964fbbb09f301d4a1b7157581c3c0/packages/perspective-viewer-d3fc/src/ts/plugin/plugin.ts#L88