JetBrains: commit search result display
Created by: vdavid
Fixes https://github.com/sourcegraph/sourcegraph/issues/35547 Fixes https://github.com/sourcegraph/sourcegraph/issues/35549
I ended up adding both “commit” and “repo” search types to this PR. The latter was pretty easy to do in a simple form.
Also:
-
cleared up the terminology for search results:
- Made a very clear distinction between “match” (what Sourcegraph returned) and “result” (a selectable item that we display)
- Renamed “idForLine” to “resultId”
- Renamed “idForMatch” to “matchId”
- Made naming specific to content search where the logic is specific to content search (in preparation for handling other search types)
- Changed the interface of
getSiblingResult()
-
renamed "UntabableRepoFileLink" to "RepoFileLinkWithoutTabStop"—not a great new name, but at least it works with the default spell checker.
-
note: the CSS files are a mess, with many duplicate code an unused code. We should clean them up later, but first, I want to make the other search types work so that we see what CSS will be reused across components.
Test plan
Tested that it works for both the "content" and "commit" search result types: https://www.loom.com/share/ba6e448dcb8c4f47b5f540f6a9d4f911 (1min) EDIT: Test for the "repo" type: https://www.loom.com/share/0003021590e642bdaaf2dfce5e7476f6 (30sec)
App preview:
Check out the client app preview documentation to learn more.