hackathon - search/notebook: select and view notebook block results
Created by: bobheadxi
This is a hackathon project, and is not being merged into
main
! See https://sourcegraph.com/notebooks/Tm90ZWJvb2s6NTE5, https://github.com/sourcegraph/sourcegraph/pull/33170, and https://github.com/sourcegraph/sourcegraph/pull/33161
This is entirely quite silly, but here we are!
Lots of hacks and caveats:
- some more code had to be copy-pasted from enterprise
- not using strong types on notebook blocks, due to OSS/enterprise. Some massaging of data needed since there appears to be three (!!!!) different iterations of notebook block types: the DB types, the GraphQL types, and then an internal representation used within the notebook components that are each ever so slightly different.
- I'm not sure how to go about doing "real" querying of blocks without some drastic database restructuring, I've left some notes in https://sourcegraph.com/notebooks/Tm90ZWJvb2s6NTE5
- Search syntax and when to search what probably needs some work
- I'm not 100% sure the match type implementation is the "right way" to do this but it does seem to work within the search job framework
- The idea originally was to have query blocks open a new window by default but since that requires fiddling with the component and this kind of... just works...
😅
And of course, the big question: