Skip to content

Symbol search broken #15243

@colin-grant-work

Description

@colin-grant-work

Bug Description:

Steps to Reproduce:

  1. Open the application in a workspace with symbols (e.g. the Theia repo)
  2. Open a code file so that there are some symbols to display.
  3. Use the 'find symbol' shortcut (default: CtrlCmd+t)
  4. Observe that an empty quickpick is shown and there is an error in the console to this effect:
Uncaught Error: Failed to execute 'add' on 'DOMTokenList': The token provided ('codicon block codicon-symbol-property') contains HTML space characters, which are not valid in tokens.

Error: Failed to execute 'add' on 'DOMTokenList': The token provided ('codicon block codicon-symbol-property') contains HTML space characters, which are not valid in tokens.

It appears that Monaco is calling classList.add on the output of this function:

protected toCssClassName(symbolKind: SymbolKind, inline?: boolean): string[] | undefined {
const kind = SymbolKind[symbolKind];
if (!kind) {
return undefined;
}
return [`codicon ${inline ? 'inline' : 'block'} codicon-symbol-${kind.toLowerCase() || 'property'}`];
}

And we're treating a sequence of class names as a single string.

Additional Information

  • Operating System: MacOS X Sequoia
  • Theia Version: dd1bb84

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions