Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

hackathon - search/notebook: select and view notebook block results #33200

Merged
merged 1 commit into from
Mar 30, 2022

Conversation

bobheadxi
Copy link
Member

@bobheadxi bobheadxi commented Mar 30, 2022

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!

Kapture.2022-03-29.at.19.03.29.mp4

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:

image

@bobheadxi bobheadxi requested a review from tsenart March 30, 2022 02:14
@cla-bot cla-bot bot added the cla-signed label Mar 30, 2022
@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented Mar 30, 2022

Codenotify: Notifying subscribers in CODENOTIFY files for diff 5828502...5577064.

Notify File(s)
@beyang internal/search/filter/select.go
internal/search/job/job.go
internal/search/notebook/notebook.go
internal/search/notebook/store.go
internal/search/notebook/store_copied.go
internal/search/result/notebook.go
internal/search/result/notebook_block.go
internal/search/streaming/http/events.go
@camdencheek cmd/frontend/internal/search/search.go
internal/search/filter/select.go
internal/search/job/job.go
internal/search/notebook/notebook.go
internal/search/notebook/store.go
internal/search/notebook/store_copied.go
internal/search/result/notebook.go
internal/search/result/notebook_block.go
internal/search/streaming/http/events.go
@keegancsmith cmd/frontend/internal/search/search.go
internal/search/filter/select.go
internal/search/job/job.go
internal/search/notebook/notebook.go
internal/search/notebook/store.go
internal/search/notebook/store_copied.go
internal/search/result/notebook.go
internal/search/result/notebook_block.go
internal/search/streaming/http/events.go
@limitedmage client/search-ui/src/results/StreamingSearchResultsList.tsx

@bobheadxi bobheadxi force-pushed the notebooks-search-block-rendering branch from 0ea5b42 to b5fbf54 Compare March 30, 2022 02:21
@bobheadxi bobheadxi force-pushed the notebooks-search-block-rendering branch from b5fbf54 to 5577064 Compare March 30, 2022 02:38
Copy link
Contributor

@tsenart tsenart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is entirely quite silly, but here we are!

LGTM! :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants