hackathon - search/notebook: basic end-to-end notebook result rendering
Created by: bobheadxi
This is a hackathon project, and is not being merged into
main
! See https://sourcegraph.com/notebooks/Tm90ZWJvb2s6NTE5
Implements end-to-end "rendering" of some stub Notebook results. For real results, see https://github.com/sourcegraph/sourcegraph/pull/33170
This was quite tedious - to define a new search thing, we have to:
- create a job
- create a match type
- create an event type + adapters
- copy the above to web app
- create custom UI (all the search results UI are very tightly coupled to the result type) to handle this result type, adding to the mess
I had to extend Match.Key
with an identifier that's not a repository, and bypass the repository permissions filter here: notebooks-search...notebooks-search-e2e-basic?expand=1
#diff-99275f59b8
Thought: A generic match + event type + UI for generic match types would be really nice IMO. Then the only custom stuff we need to create is a job to extend search with new backends, and everything else would ideally take care of itself. I suspect extending this to include notebook blocks, then batch changes, then etc. will not be very pretty
My first thought is that there seem to be roughly 2 categories:
- "Entity" things (repos, commits, files, etc + notebooks)
- "Content" things that fall under an entity (content, symbols, etc + notebook blocks)