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

Redundant display of signature help #48231

Closed
ghost opened this issue Apr 19, 2018 · 2 comments
Closed

Redundant display of signature help #48231

ghost opened this issue Apr 19, 2018 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues verified Verification succeeded
Milestone

Comments

@ghost
Copy link

ghost commented Apr 19, 2018

Issue Type: Bug

  • Type:
/**
 * Doc
 * @param p Param
 */
function f(p: string) {}

f
  • Type a ( to open signature help.
  • Expected: Shows the parameter documentation only once.
  • Actual: Shows it in two places, and hard to tell it apart from the function's own documentation.

param

VS Code version: Code - Insiders 1.23.0-insider (88f500e, 2018-04-18T05:12:32.564Z)
OS version: Linux x64 4.13.0-37-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (8 x 2600)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: unavailable_software
video_encode: unavailable_software
webgl: enabled
webgl2: enabled
Load (avg) 1, 1, 1
Memory (System) 7.63GB (2.17GB free)
Process Argv /usr/share/code-insiders/code-insiders src
Screen Reader no
VM 0%
Extensions (1)
Extension Author (truncated) Version
typescript-javascript-grammar ms- 0.0.39
@ghost
Copy link
Author

ghost commented Apr 19, 2018

For reference, here's what tsserver provides:

{
    "seq": 0,
    "type": "response",
    "command": "signatureHelp",
    "request_seq": 309,
    "success": true,
    "body": {
        "items": [
            {
                "isVariadic": false,
                "prefixDisplayParts": [
                    {
                        "text": "f",
                        "kind": "functionName"
                    },
                    {
                        "text": "(",
                        "kind": "punctuation"
                    }
                ],
                "suffixDisplayParts": [
                    {
                        "text": ")",
                        "kind": "punctuation"
                    },
                    {
                        "text": ":",
                        "kind": "punctuation"
                    },
                    {
                        "text": " ",
                        "kind": "space"
                    },
                    {
                        "text": "void",
                        "kind": "keyword"
                    }
                ],
                "separatorDisplayParts": [
                    {
                        "text": ",",
                        "kind": "punctuation"
                    },
                    {
                        "text": " ",
                        "kind": "space"
                    }
                ],
                "parameters": [
                    {
                        "name": "p",
                        "documentation": [
                            {
                                "text": "Param",
                                "kind": "text"
                            }
                        ],
                        "displayParts": [
                            {
                                "text": "p",
                                "kind": "parameterName"
                            },
                            {
                                "text": ":",
                                "kind": "punctuation"
                            },
                            {
                                "text": " ",
                                "kind": "space"
                            },
                            {
                                "text": "string",
                                "kind": "keyword"
                            }
                        ],
                        "isOptional": false
                    }
                ],
                "documentation": [
                    {
                        "text": "Doc",
                        "kind": "text"
                    }
                ],
                "tags": [
                    {
                        "name": "param",
                        "text": "p Param"
                    }
                ]
            }
        ],
        "applicableSpan": {
            "start": {
                "line": 8,
                "offset": 3
            },
            "end": {
                "line": 8,
                "offset": 3
            }
        },
        "selectedItemIndex": 0,
        "argumentIndex": 0,
        "argumentCount": 0
    }
}

@mjbvz mjbvz self-assigned this Apr 19, 2018
@mjbvz
Copy link
Contributor

mjbvz commented Apr 19, 2018

Yes we render all tags from the signatureHelp response. This generally makes sense for completion items but we may want to strip out @param tags when rendering signature help

@mjbvz mjbvz added bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues labels Apr 30, 2018
@mjbvz mjbvz added this to the May 2018 milestone Apr 30, 2018
@mjbvz mjbvz closed this as completed in a32ca17 Apr 30, 2018
@dbaeumer dbaeumer added the verified Verification succeeded label May 30, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug javascript JavaScript support issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

2 participants