0

I am building a jupyter lab extension. I have managed to create an extension which opens a tab from the launcer. From this tab, I want a user to be able to click on a feature and be navigated to a new tab. Is this possible? I am new to jupyter lab extensions

I am exploring widgets

1 Answers1

1

I'm not sure if you can use the ILabShell interface from a widget, but you can use the DocumentManager interface. The openOrReveal method should do what you want.

The following should work:

from jupyterlab.services import DocumentManager
from jupyterlab.commands import CommandRegistry

# Create a document manager and a command registry
manager = DocumentManager()
registry = CommandRegistry()

# Open a new tab
manager.openOrReveal('Untitled.ipynb', registry)
PCDSandwichMan
  • 1,964
  • 1
  • 12
  • 23