Skip to content

Define a plugin class/dataclass to couple on_config_change and anywidget.invoke handlers with plugin_esm #347

@keller-mark

Description

@keller-mark

Certain types of plugins will entail both custom JS and Python functions that need to work together.

#337 documents the support for plugin_esm, but we should add a way to specify both the JS and Python so that users can pull them in together. Unclear exactly what the API should be

class VitesscePlugin:
  plugin_esm: str
  on_config_change: Function
  # everything else: assumed to be needed for .invoke / need to be registered as `@anywidget.command` on VitessceWidget class?

then can just pass an array of VitesscePlugin subclass instances like

vc.widget(plugins=[MyVitesscePlugin()]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions