You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 27, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 27, 2019. It is now read-only.
Improve the tooltip message when no code intelligence is available for a symbol #27
Sometimes there's just no info available; rather than showing nothing on hover (and having the user wonder if the site is broken), we could immediately show a tooltip saying "no information available".
Sometimes hovering over certain symbols will just show the symbol name; this isn't very useful and we should default to the above behavior instead.
@akhleung would you be able to tell on page load if there is no information available on a symbol? Or do you have to wait for a hover response to discover there is no information on a symbol?
Hmm ... we thought that doing it in the langserver would be a quicker fix, but doing it in the UI might be the best way, assuming one set of behaviors is sufficient for all languages.
@akhleung let's explore the fix for all languages with @beyang during our lang sync tomorrow and see if there is a set of behaviours sufficient for all languages.
Okay ... I should also mention now that this isn't as easy as it seemed at first glance; for example, when Jedi returns a single symbol, it's kind of hard to tell whether it's the name of a type, or just the name of the original symbol (we'd have to manually parse and walk the AST in order to determine that). Might be easier and safer overall to do it in the UI, since I assume it tokenizes and can easily compare the result to the input symbol.
Also, if we were to return a message like "nothing found" when there's no result, I think the current tooltip would still show the buttons for defs, refs, etc, because the response is non-empty, right? We'd have to change that too.
Activity
lindaxie-zz commentedon Jun 28, 2017
@akhleung would you be able to tell on page load if there is no information available on a symbol? Or do you have to wait for a hover response to discover there is no information on a symbol?
akhleung commentedon Jun 28, 2017
Not possible to do it on page load; we'd have to preemptively get definitions for every symbol, which would be very expensive.
nicksnyder commentedon Jun 28, 2017
@akhleung Is this specific to python langserver or should this be a UI issue on sourcegraph?
akhleung commentedon Jun 28, 2017
Hmm ... we thought that doing it in the langserver would be a quicker fix, but doing it in the UI might be the best way, assuming one set of behaviors is sufficient for all languages.
lindaxie-zz commentedon Jun 28, 2017
@akhleung let's explore the fix for all languages with @beyang during our lang sync tomorrow and see if there is a set of behaviours sufficient for all languages.
akhleung commentedon Jun 29, 2017
Okay ... I should also mention now that this isn't as easy as it seemed at first glance; for example, when Jedi returns a single symbol, it's kind of hard to tell whether it's the name of a type, or just the name of the original symbol (we'd have to manually parse and walk the AST in order to determine that). Might be easier and safer overall to do it in the UI, since I assume it tokenizes and can easily compare the result to the input symbol.
Also, if we were to return a message like "nothing found" when there's no result, I think the current tooltip would still show the buttons for defs, refs, etc, because the response is non-empty, right? We'd have to change that too.
lindaxie-zz commentedon Jun 29, 2017
Next step: @akhleung hide tooltip CTAs in UI.