sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.28k forks source link

symbol and repo result types should have match highlighting #5391

Open slimsag opened 5 years ago

slimsag commented 5 years ago

When you do a text search, diff search, commit search, , we highlight the relevant matches:

image

But when you do a symbol search we don't and it can often be hard to find the matching portion:

image

The same is true of repository results, but it is less noticeable due to them not looking like code blocks:

image

I would argue this is more of a bug than a feature request -- even though it appears we never supported this previously.

Proposal: all matches should be highlighted, including symbol and repository result types.

/cc @sourcegraph/search-platform

nicksnyder commented 5 years ago

I don't think I would call this a bug. While it might not be what users expect/want, there isn't a defect in the code. Assigning to @christinaforney for prioritization.

slimsag commented 5 years ago

"product bug" would be a better description perhaps. If the behavior was not intentional and deviates what we do from everything else, I consider it a product behavior bug.

It could very well also be a code bug? I haven't investigated that

christinaforney commented 5 years ago

Thanks for filing @slimsag - agree this would be a good improvement.

camdencheek commented 7 months ago

Ha, I just noticed this again today. We now highlight repo names, but we still do not highlight symbol names. This would need to be supported by the symbol search evaluation code, so reassigning to the platform team. I'd be happy to use that info to highlight the symbol results in the web client if we can get those ranges.