microsoft / microsoft/monaco-editor

[Bug] Suggestion widget width is not commensurate with content width

Open
#4,337 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

Reproducible in vscode.dev or in VS Code Desktop?
  • Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.45.0#example-extending-language-services-completion-provider-example

Monaco Editor Playground Code
It's unchanged from the link provided.
Reproduction Steps

Resize the window so that it's as narrow as possible (width is small). Type something that will open the suggestion widget. The widget will be wider than the content by a large margin.

Actual (Problematic) Behavior

The widget will be wider than the content by a large margin.

Expected Behavior

The widget would be as wide as it becomes when you double click the edge of the widget. It would also be great to be able to specify minimum width / maximum width or otherwise specify the dimensions of the suggestion widget, but I can't find that functionality in the documentation.

Additional Context

Here's a link to a video showing the issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Monaco Editor Playground example, extending-language-services-completion-provider-example, and reproduce the suggestion widget at a narrow window width. Compare its width with the content and with the width after double-clicking the widget edge; done means the narrow layout no longer leaves a large excess margin or the supported sizing behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.