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

Improve item width size estimation heuristic support #1025

Merged
merged 1 commit into from Nov 26, 2023

Conversation

krassowski
Copy link
Member

References

Fixes #1002

Code changes

The issue was that:

  • (a) heuristic did not account for eliding
  • (b) styles limiting the width were not applied when the widest item size was calculated after temporarily re-parenting to <body>
  • (c) there was no limit on ellipsis width (now its 50% of label)
  • (d) the label size limit maybe was too low, it got increased by 50px

User-facing changes

Eliding of paths works better. There should be no empty (unutilised) space in the completer anymore

Backwards-incompatible changes

None

The issue was that:
- (a) heuristic did not account for eliding
- (b) styles limiting the width were not applied when
  the widest item size was calculated after temporarily
  re-parenting to `<body>`
- (c) there was no limit on ellipsis width (now its 50% of label)
- (d) the label size limit maybe was too low, it got increased by 50px
@krassowski krassowski added the bug Something isn't working label Nov 26, 2023
Copy link

Binder 👈 Launch a binder notebook on branch krassowski/jupyterlab-lsp/fix-eliding

@krassowski krassowski merged commit 5f70fe1 into jupyter-lsp:main Nov 26, 2023
17 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Number of characters displayed on the autocompletion box
1 participant