Skip to content

Conversation

@timkpaine
Copy link
Member

JupyterLab has a mechanism for having plugins depend on other plugins.

Since perspective registers custom elements (see perspective-dev#3056), this change lets other Jupyter extensions "depend" on @finos/perspective-jupyterlab by doing:

import {IPerspective} from "@finos/perspective-jupyterlab";

export const MyCoolPlugin = {
  activate,
  id: "my-cool-plugin",
  requires: [IPerspective],
  autoStart: true,
};

This then ensures that @finos/perspective-jupyterlab gets activated before MyCoolPlugin, ensuring that custom webcomponents and wasm loading occurs. Downstream plugins like MyCoolPlugin can then just do:

import perspective from "@finos/perspective";

without any additional initialization.

Fixes perspective-dev#3056

I'm open to adding tests but its just a constant, not sure what the best mechanism for doing so is.
We can also add developer docs if we want, happy to write them. done

Pull Request Checklist

  • Description which clearly states what problems the PR solves.
  • Description contains a link to the Github Issue, and any relevent
    Discussions, this PR applies to.
  • Include new tests that fail without this PR but passes with it.
  • Include any relevent Documentation changes related to this change.
  • Verify all commits have been signed in accordance with the DCO policy.
  • Reviewed PR commit history to remove unnecessary changes.
  • Make sure your PR passes build, test and lint steps completely.

@timkpaine timkpaine force-pushed the tkp/token branch 4 times, most recently from d11cfe7 to 212f62a Compare October 8, 2025 19:57
Signed-off-by: Tim Paine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Perspective JupyterLab plugin cannot be used with other plugins that use perspective

2 participants