ide-typescript icon indicating copy to clipboard operation
ide-typescript copied to clipboard

Improve or suppress hover that displays "any" for JavaScript functions

Open jasonrudolph opened this issue 6 years ago • 6 comments

Description

When using ide-typescript with JavaScript files, I often see a tooltip like the one below. As far as I can tell, this tooltip isn't providing useful information. As a result, I find these tooltips distracting. Would it be possible to suppress these tooltips or enhance them in a way that they provide meaningful information about the function?

Steps to Reproduce

  1. Open atom/teletype-client:test/rest-gateway.test.js in Atom
  2. Hover over the the call to close on line 12

Expected behavior:

No tooltip appears, or tooltip appears with additional information about the close function

Actual behavior:

Tooltip appears with the word "any"

Reproduces how often:

100%

Versions

$ apm list | grep ide-
├── [email protected]
├── [email protected]

$ atom --version
Atom    : 1.25.0-dev-8ba04f0f0
Electron: 1.7.11
Chrome  : 58.0.3029.110
Node    : 7.9.0

jasonrudolph avatar Feb 07 '18 16:02 jasonrudolph

@daviwil: Following up on our discussion in chat, here's an example of a place where the datatips are useful in JavaScript files:

  1. Open atom/teletype-client:test/rest-gateway.test.js in Atom

  2. Hover over the the call to get on line 26

jasonrudolph avatar Feb 07 '18 17:02 jasonrudolph

About the only thing we can do here is hide 'any' responses for '.js' files. This will mean if you hover over stuff we don't have anything except 'any' for nothing will happen. Just like if it isn't working...

I'm not sure which is worse.

damieng avatar Feb 07 '18 17:02 damieng

I think that would be fine if there is a configuration option for it in settings. Doesn't matter then if it's ticked or not by default (I'll let you decide what is best) but then it would be explicit rather than implicit, which I agree could lead to it looking like it's broken.

jackfranklin avatar Feb 14 '18 22:02 jackfranklin

Tacking on to this, I would love the option to disable "help" datatips separately from linting datatips, or even a blacklist of methods to omit datatips. Methods defined in the project are really helpful, but I find the core language tips really distracting (especially Array.map, which always seems to put the tooltip window directly over the function I'm writing).

jfurfaro avatar Mar 05 '18 05:03 jfurfaro

You can turn datatips off entirely in the atom-ide-ui settings.

damieng avatar Mar 05 '18 14:03 damieng

Unfortunately that turns off datatips for linting as well

jfurfaro avatar Mar 05 '18 15:03 jfurfaro