Open macraig opened 2 years ago
Heads up @macraig - the "team/code-intelligence" label was applied to this issue.
Cross-linking this issue here for API implementation: https://github.com/sourcegraph/sourcegraph/issues/31071
Here's another thing that makes it feel unrealiable: we do have some weird double-renders sometimes (I suspect that this stray ?References
GraphQL query has something to do with it):
https://user-images.githubusercontent.com/1185253/157445115-c638b89f-ec5b-4afe-bf2a-861bf6d78282.mp4
I dug into this today, trying to see how hard it would be to add a "No results" in the hover if we can't find anything. I'd prefer that over seeing a spinner and the tooltip then disappearing.
Some findings:
https://user-images.githubusercontent.com/1185253/157459009-0211fb15-1337-4bd2-bd2e-4ed6100edda6.mp4
Pulled these out in issues https://github.com/sourcegraph/sourcegraph/issues/33557 and https://github.com/sourcegraph/sourcegraph/issues/33558
Bug report (copied from Slack):
Problem: I’m trying to go to the definition of a Java class. When I hover over the class name, the code intel popup shows a progress indicator, then disappears after a few secs. 34-sec Loom Solution suggestion: I’d be happier with even a simple “No definition or references found” message than with the silently disappearing box. The error message would indicate to me that there is no bug in the UI, just no data was found. With the current state, I have no clue if it’s a UI error, a backend error, or just no data found. If we want to make it super cool, we could check the file type and be more specific, e.g. tell the user additional context like “This is a Kotlin file, and your definition might be in Java. We currently don’t have a cross-language association for Kotlin and Java, but it’s on our roadmap to add it.”
Goal
Improve user quality of life by making code intelligence more predictable.
Problem
We've had a lot of discussions (and tickets and Slack threads) over the years on how users have a hard time anticipating if and when a hover tooltip will show and whether it will contain useful information.
Users don't know what to expect or why things happened the way they did. Unsure whether tooltip didn't show up because of network problems, or because there never will be hover tooltip on that token (some tokens don't have hovers and that's completely fine), or because no data is available (search-based is indexing in background, no LSIF dump uploaded), etc.
Documented issues