New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search frontend: render streaming search results #16097
Conversation
Codecov Report
@@ Coverage Diff @@
## main #16097 +/- ##
=======================================
Coverage 52.86% 52.87%
=======================================
Files 1645 1645
Lines 82314 82328 +14
Branches 7248 7341 +93
=======================================
+ Hits 43517 43532 +15
+ Misses 34947 34945 -2
- Partials 3850 3851 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@limitedmage anything in particular you would like non-search frontend devs to look at here?
url: '/github.com/golang/oauth2', | ||
matches: [] as ISearchResultMatch[], | ||
label: { __typename: 'Markdown', text: '[github.com/golang/oauth2](github.com/golang/oauth2)' }, | ||
} as IRepository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered using our precise query-specific generated types? Even if you're not running a query but using SSE, you could define a fragment for it (that's not used) and use the type for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we definitely want to use backend-generated types. I'll see how this can be done separately.
Mostly any general comments on making sure that I'm doing the right thing in the frontend :) Eg. Maybe I'm not following a pattern correctly or there is a different component I can use to accomplish something I'm doing manually. |
Renders search results for streaming search!
This still uses the GraphQL data types. This will be later changed as @keegancsmith is going to update the API so conversion to GraphQL types is no longer required (primarily adding a string type to each result)
Note that lots of features are still missing here (eg. loading state, footer, etc). This is meant to be the initial work to render results.
There is a bug in storybook tests where not all code excerpts are being rendered: #16095 This doesn't happen in the real webapp.