Skip to content
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

Storybook Tests: only the first code excerpt is loaded in search results #16095

Open
limitedmage opened this issue Nov 23, 2020 · 2 comments
Open
Labels
bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. team/code-search Issues owned by the code search team testing Issues that deal with unit tests, integration tests and the testing infrastructure.

Comments

@limitedmage
Copy link
Contributor

In storybook tests which show search results (both for GraphQL and streaming search), only the first code excerpt is loading:

image

After debugging, I found out that the code excerpt thinks it's not visible. The library we are using to determine visibility is react-visibility-sensor, which looks like it's dead: joshwnj/react-visibility-sensor#179
We should consider switching to a newer library that uses InsersectionObserver instead, such as this one: https://github.com/thebuilder/react-intersection-observer

Note that this does not happen in the actual web app, only in storybook tests.

@limitedmage limitedmage added bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. team/search testing Issues that deal with unit tests, integration tests and the testing infrastructure. labels Nov 23, 2020
@github-actions
Copy link
Contributor

Heads up @lguychard - the "team/search" label was applied to this issue.

limitedmage added a commit that referenced this issue Nov 24, 2020
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.
@lguychard lguychard added team/search-product Issues owned by the search product team and removed team/search labels Nov 5, 2021
@fkling
Copy link
Contributor

fkling commented Feb 9, 2024

Confirmed that this still seems to be a problem.

@fkling fkling added team/code-search Issues owned by the code search team and removed team/search-product Issues owned by the search product team labels Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error, flaw or fault that produces an incorrect or unexpected result, or behavior. team/code-search Issues owned by the code search team testing Issues that deal with unit tests, integration tests and the testing infrastructure.
Development

No branches or pull requests

3 participants