Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should decorate completer node to reduce CSS selector complexity #960

Open
krassowski opened this issue Aug 26, 2023 · 1 comment
Open

Comments

@krassowski
Copy link
Member

Since #949 we no longer override the completer handler and do not have access to widget, hence we set the a data attribute on body and use a selector like body[data-lsp-completer-layout] .jp-Completer; this is somewhat wasteful as the browser needs to traverse the DOM tree up until body to check if the element of given class should be decorated.

In jupyterlab/jupyterlab#9763 I proposed to allow to add a class in renderer upstream; if the completion renderer had createWidgetNode() method we could add the data attributes (or classes directly), reducing the CSS selector complexity.

  • jupyterlab-lsp 5.0-alpha.0
  • jupyterlab 4.0.5
@krassowski
Copy link
Member Author

This is low priority because as of today the completer gets attache directly to the body, which means that the distance to traverse is tiny.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant