Improve visual clarity and add CTAs re code intel
Created by: shrouxm
The current UI leaves a lot of room for confusion when using hovers, go-to-defs, and find-refs. I want the status of code intelligence to be visually clear both passively and when doing code intel things. I also want there to be specific explanations/instructions to improve the status of code intel when relevant. Some of this already exists.
If I were purely optimizing for precise code intel usability and adoption, I would want the following specific things:
- Badge/indicator somewhere prominent on the page, with 3 states: basic code intel, loading precise code intel, precise code intel
- The basic code intel badge shouldn't be angry, but the precise code intel badge should be very happy :)
- On the website, this lives in the top right bar next to git blame. (Or somewhere better? I don't UI enough to know how to place buttons).
- In the code host extensions, this lives in the sourcegraph badge.
- When hovering the badge:
- the basic code intel state contains an explanation + CTA to add LSIF data
- the loading badge contains more information about indexing progress
- the precise code intel badge says which commit the data is coming from
- This information is only relevant for source files in languages we currently have good precise code intel support, so we should show it selectively
- When hovering symbols:
- When code intel isn't yet available, there is an error/loading indicator with an explanation for why it's not available
- Otherwise, the hover card + find-ref results both also have the above badge
But I'm open to pushback/alternatives on everything.
cc @sourcegraph/web, thoughts on all of this? and if you were to implement it, what would the timeline be?
assigned to me while in planning phase, will re-assign/re-assess milestone when we decide what implementation looks like.