Skip to content

Intellisense suggestions should display an horizontal scrollbar if needed #29757

Closed

Description

@fbricon
  • VSCode Version: 1.13.0
  • OS Version: macOS Sierra 10.12.5

Steps to Reproduce:

  1. install java extension
  2. open java file
  3. type import o, wait for suggestions to show up
    suggestions are truncated because the package names don't fit in the suggestion window, there's no way to scroll horizontally

See redhat-developer/vscode-java#249
https://gyazo.com/9f0b536a9f71d72a4939ffbb4834340d

Reproduces without extensions: Maybe

Activity

  1. added
    suggestIntelliSense, Auto Complete
    uxUser experience issues
    and removed
    extensionsIssues concerning extensions
    on Jun 30, 2017
  2. stevencl commented on Nov 16, 2017

    @stevencl
    Member

    I am not sure how well a horizontal scroll bar would work. How difficult would it be to increase the width to accomodate these longer strings, if the string is longer than would fit in the default width?

    The problem with the scroll bar is that once you scroll to the right, you need to scroll back to the left if you arrow down and the next item is much shorter in length. A solution to that would be to auto scroll back to the left after making another selection but then that could run into problems if the list looks like the screenshot above.

  3. fbricon commented on Nov 16, 2017

    @fbricon
    ContributorAuthor

    The problem with the scroll bar is that once you scroll to the right, you need to scroll back to the left if you arrow down and the next item is much shorter in length

    This is the behaviour I see in Eclipse. With a trackpad, it's absolutely manageable.
    I think this would give users less surprises than trying to autoscroll back when changing the selection.
    A better solution would probably be to scroll left only if the selection text size is lower than the x-position of the currently visible pane, but that's probably too complicated

  4. hdorgeval commented on Nov 16, 2017

    @hdorgeval

    One of my colleague shows me that, in the css that drives the suggestion list, there is a width:50% that is set. when forced to 100%, the width of the suggestion list is then ok (no cropping). It could be great if the suggestion-list max width could be parameterized directly in the workspace settings

  5. hdorgeval commented on Nov 16, 2017

    @hdorgeval

    Here is a screenshot of this css rule:
    screen shot 2017-11-16 at 22 39 27

    When I set the value to 70%:
    screen shot 2017-11-16 at 22 41 37

  6. hdorgeval commented on Nov 16, 2017

    @hdorgeval

    I have also discovered that if you reduce the width of the VS Code editor window, then suddenly there is no more cropping as shown by the following sceenshot:
    screen shot 2017-11-16 at 22 51 12

  7. emeentag commented on Dec 24, 2017

    @emeentag

    This is definitely a usability issue and please take care of it. I am pretty sure you can solve it in a good way. Also as Fred Bricon (@fbricon) said in eclipse and others there is horizontal scroll bar appears if horizontal scroll bar needed. Also you can resize the suggestion bubble with catching it and dragging from bottom right corner.

  8. 31 remaining items

  9. akaroml commented on Dec 4, 2019

    @akaroml
    Member

    Rome Li (@akaroml) Did you experiment with only using the last part as label, e.g. FooValidatorFactory, and to use the fully qualified name in the detail or description only? I am asking because I think that even adding a scrollbar or label-shorting won't help much with being able to quickly grasp what's showing on the screen. In addition to the short-labels you can still suggest package names, like so

    label: FooValidator, detail: org.hip.hop. FooValidator
    label: FooValidatorFactory, detail: org.hip.hop. FooValidatorFactory
    label: org, detail: package
    

    That would allow to type package names and type names and would make the IntelliSense widget less busy.

    Just tried to put the short name in the front and it looks good enough for me. What do you think? Fred Bricon (@fbricon)
    image

  10. akaroml commented on Dec 4, 2019

    @akaroml
    Member

    Further playing with my modification, there is actually a new problem. As I keep on typing "spring" to limit the search scope, the highlighting works in a weird way. I was expecting the term "org.spring" to be highlighted, but only "spring" is. I guess it has something to do with the string match algorithm in vscode.

    image

  11. hxuanhung commented on Dec 10, 2019

    @hxuanhung

    In case anyone wants to use the hack above, on Mac and vscode (1.41.0-insider) file name is changed to workbench.desktop.main.css

    Steps:
    Open VsCode's package contents folder. It is the folder where you installed VsCode on your machine. Could be different for each operating systems.
    In mac i went through this path for the css file:
    Your Package Contents/Resources/app/out/vs/workbench/workbench.main.css
    Search for this line:
    .monaco-editor .suggest-widget.docs-side>.tree
    Edit width css property from 50% to 100%
    Save and restart vscode. You will get a warning like Your Code installation appears to be corrupt. Please reinstall. Just ignore it because with doing this way, we broke the md5 checksum of the installation. For me a proper suggestion much more important than this warning.

  12. mahop-net commented on Mar 11, 2020

    @mahop-net

    What is the situation right now? Also for JS Development this box is pretty small? Resizing the Box with the mouse and remembering the width and hight for the next time would be great...

    2020-03-11_1812

    Or a setting somewhere here: (Workspace and User)

    grafik

  13. ValentinH commented on Apr 20, 2020

    @ValentinH

    A pretty similar issue is with the "auto-import" labels which are way too short:
    image

    When you are importing a type with a common name, it's really hard to know which one to import.

  14. ValentinH commented on Apr 20, 2020

    @ValentinH

    I actually noticed that if you hover the row, there is an "i" icon.
    image

    If you click on it, the description will be shown in a new popup attached to the first one:
    image

    The best part is that once you clicked it, it will stay in this mode for the next time.

  15. jayjun commented on May 19, 2020

    @jayjun
    Contributor

    To everyone resorting to the CSS hack, upvote #30140 to make bottom suggestion details permanent.

  16. chetrf commented on Jun 14, 2020

    @chetrf

    To anyone having trouble getting the CSS hack to work, one more detail that finally made it work for me: I had to change the Editor: Suggest Font Size from zero to something smaller than my default font. I had almost given up on getting the CSS hack to work. After I did that the change from 50% to 100% worked. This is on MacOs Catalina.

    suggestFontSize

    It seems I can make it bigger, smaller, or zero and the CSS hack now works. Something about changing it made the change start working.

  17. Jonathan0wh commented on Jul 3, 2020

    @Jonathan0wh

    waiting for feature request #29126

  18. JCKodel commented on Jul 18, 2020

    @JCKodel
    1. Create the following css in your user folder (figure out paths if you are not on Windows):
    .monaco-editor .suggest-widget.docs-side{
      left: 32px !important;
      right: 32px !important;
      width: calc(100vw - 64px) !important;
    }
    
      .monaco-editor .suggest-widget.docs-side .tree {
        width: 34% !important;
      }
    
      .monaco-editor .suggest-widget.docs-side .details {
        width: 66% !important;
      }
    1. Install be5invis.vscode-custom-css extension

    2. Insert this on your settings.json:

      "vscode_custom_css.imports": [
        "file://C:/Users/jckod/vscode.css"
      ],
      "vscode_custom_css.policy": true
    1. Press F1 to get the command palette and run Reload custom CSS and JS

    2. Restart VSCode when requested in the notification

    3. Ignore the "VSCode install is corrupt"

    image

    Nice full screen intellisense, with no jumping.

    See? Is not that hard, Microsoft. I don't care if it is not right on the cursor position. I just care about being able to read the f☠ documentation ¬¬

  19. jrieken commented on Oct 26, 2020

    @jrieken
    Contributor

    The suggestions and the details part are going to be resizable (see #29126 (comment)). I am closing this as a related/duplicated issue.

  20. locked and limited conversation to collaborators on Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requestRequest for new features or functionalitysuggestIntelliSense, Auto Completeunder-discussionIssue is under discussion for relevance, priority, approachuxUser experience issues

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions