Hi there! Recently, I've been working on putting together a custom sidebar. During my research, I stumbled upon the code snippet below which supposedly helps in creating a simple sidebar. Unfortunately, I am facing some issues with it and would greatly appreciate any insights on why it's not functioning properly or if there are any fixes that need to be made.
One specific error that keeps popping up while compiling the code is related to missing 'node_modules'.
My goal is to start with a basic UI layout and gradually incorporate additional features as I progress. Your expertise and assistance on this matter would be invaluable. Thank you!
/**
* Activate the extension.
*/
function activateext(
app: JupyterLab,
docmanager: IDocumentManager,
editorTracker: IEditorTracker,
restorer: ILayoutRestorer,
notebookTracker: INotebookTracker,
rendermime: IRenderMimeRegistry,
palette: ICommandPalette,
): IExt {
// Create the ext widget.
const ext = new Ext({docmanager, rendermime, palette});
// Create the ext registry.
const registry = new ExtRegistry();
//add commands
addCommands(app, palette);
// Add the ext to the left area.
ext.title.label = 'DTLA';
ext.id = 'table-of-contents';
app.shell.addToLeftArea(ext, {rank: 700});
// Add the ext widget to the application restorer.
restorer.add(ext, 'juputerlab-ext');
return registry;
}
export default extension;
I came across this code snippet on JupyterLab - add a subset of commands to sidebar tab