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
References panel: Fetch search based definitions if no precise definitonis were found #50157
Merged
philipp-spiess
merged 3 commits into
main
from
ps/ref-panel-load-search-based-definitions-if-no-precise-found
Mar 30, 2023
Merged
References panel: Fetch search based definitions if no precise definitonis were found #50157
philipp-spiess
merged 3 commits into
main
from
ps/ref-panel-load-search-based-definitions-if-no-precise-found
Mar 30, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
the
team/code-exploration
Issues owned by the Code Exploration team
label
Mar 30, 2023
Codenotify: Notifying subscribers in CODENOTIFY files for diff ca52665...cacce05.
|
olafurpg
approved these changes
Mar 30, 2023
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.
@philipp-spiess Thank you for looking into this issue! The diff LGTM 👍🏻
But I didn't manually test the changes locally.
philipp-spiess
deleted the
ps/ref-panel-load-search-based-definitions-if-no-precise-found
branch
March 30, 2023 15:22
github-actions bot
pushed a commit
that referenced
this pull request
Mar 30, 2023
…tonis were found (#50157) Workaround for sourcegraph/customer#1995 This is a workaround to fix sourcegraph/customer#1995 until we have time for a bigger scale fix up from all of our code intel APIs on the frontend (c.f. #49199). I’m OOO the next week and want to get a fix for the customer in though, hence this PR. I did some investigations and this seems to match the behavior of the hover tooltip: If no precise definition is found, it seems to use the presence of a search based definition to render the buttons. It also seems to do this regardless of the `shouldMixPreciseAndSearchBasedReferences` flag. ## Test plan (this is a bit more involved to reproduce so hear me out) 1. Enable npm package code intel feature flag 2. Add npm package to code host config 3. Add a precise index for the Sourcegraph repo 4. Open a random tsx file (e.g. `SourcegraphWebApp.tsx`). It should show precise indexes and should show you that there are definitions on the hover tooltip. 5. Now click on the "Go to definition" button. Since there's no precise match, it will open the references panel. Before the fix, the references panel would show no resources. After the fix, it will show search based definitions. <img width="1153" alt="Screenshot 2023-03-30 at 13 08 36" src="https://user-images.githubusercontent.com/458591/228823934-8e72b79c-d22b-45e9-86d3-fbac0d770d9c.png"> <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> ## App preview: - [Web](https://sg-web-ps-ref-panel-load-search-based.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more. (cherry picked from commit f17f88b)
coury-clark
pushed a commit
that referenced
this pull request
Mar 31, 2023
… precise definitonis were found (#50179) Workaround for sourcegraph/customer#1995 This is a workaround to fix sourcegraph/customer#1995 until we have time for a bigger scale fix up from all of our code intel APIs on the frontend (c.f. #49199). I’m OOO the next week and want to get a fix for the customer in though, hence this PR. I did some investigations and this seems to match the behavior of the hover tooltip: If no precise definition is found, it seems to use the presence of a search based definition to render the buttons. It also seems to do this regardless of the `shouldMixPreciseAndSearchBasedReferences` flag. ## Test plan (this is a bit more involved to reproduce so hear me out) 1. Enable npm package code intel feature flag 2. Add npm package to code host config 3. Add a precise index for the Sourcegraph repo 4. Open a random tsx file (e.g. `SourcegraphWebApp.tsx`). It should show precise indexes and should show you that there are definitions on the hover tooltip. 5. Now click on the "Go to definition" button. Since there's no precise match, it will open the references panel. Before the fix, the references panel would show no resources. After the fix, it will show search based definitions. <img width="1153" alt="Screenshot 2023-03-30 at 13 08 36" src="https://user-images.githubusercontent.com/458591/228823934-8e72b79c-d22b-45e9-86d3-fbac0d770d9c.png"> <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> ## App preview: - [Web](https://sg-web-ps-ref-panel-load-search-based.onrender.com/search) Check out the [client app preview documentation](https://docs.sourcegraph.com/dev/how-to/client_pr_previews) to learn more. <br> Backport f17f88b from #50157 --------- Co-authored-by: Philipp Spiess <hello@philippspiess.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Workaround for https://github.com/sourcegraph/customer/issues/1995
This is a workaround to fix https://github.com/sourcegraph/customer/issues/1995 until we have time for a bigger scale fix up from all of our code intel APIs on the frontend (c.f. #49199). I’m OOO the next week and want to get a fix for the customer in though, hence this PR.
I did some investigations and this seems to match the behavior of the hover tooltip: If no precise definition is found, it seems to use the presence of a search based definition to render the buttons. It also seems to do this regardless of the
shouldMixPreciseAndSearchBasedReferences
flag.Test plan
(this is a bit more involved to reproduce so hear me out)
SourcegraphWebApp.tsx
). It should show precise indexes and should show you that there are definitions on the hover tooltip.Before the fix, the references panel would show no resources. After the fix, it will show search based definitions.
App preview:
Check out the client app preview documentation to learn more.