Can't seem to reach the palette

Hiya lads

Trying to write my first jlab extension, I’m having trouble dealing with the palette

With the code below, I have been able to write a command, and to bind it to a keystroke

But then, when invoking the palette with shift-command-C, I was expecting to find my command when typing e.g. hide-input, but to avail, neither with any other keyword that I could think of

What am I doing wrong ?

thanks for your help

const plugin: JupyterFrontEndPlugin<void> = {
// snip
  activate: (app: JupyterFrontEnd, palette: ICommandPalette, notebookTracker: INotebookTracker) => {

    const command: string = "set-hide-input"

      command, {
      // snip

      command: command,
      // snip

    palette.addItem({ command, category: 'Tuto' })

    // snip

The fuzzy search is based on the caption field: does the custom category appear?

Also see the official examples repo.

1 Like

thanks, this is helpful :slight_smile:

the sample extension fails to illustrate the difference between label and caption, so for now I’m going with just a label and that seems to work fine, anyone cares to elaborate ?

thanks again