This repository was archived by the owner on Sep 30, 2024. It is now read-only.
fix(search): VSCode Search extension: hide file preview link#63552
Merged
Conversation
peterguy
commented
Jun 28, 2024
camdencheek
approved these changes
Jun 28, 2024
Comment on lines
+85
to
+89
| /** | ||
| * Don't display the file preview button in the VSCode extension. | ||
| * Expose this prop to allow the VSCode extension to hide the button. | ||
| * Name it "hide" in an attempt to communicate that hiding is a special case. | ||
| */ |
Member
There was a problem hiding this comment.
Thanks for the nice disclaimers 🙂
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The VSCode Search extension does not support file preview, so hide it from the search results when the search originates from the VSCode Search extension.
Example showing the file preview links (before this PR):

Example without the file preview links (after this PR):

Test plan
Automated tests still pass
Including visual and functional tests of the file preview functionality.
Build and run locally
Build
Run
Run and Debugsidebar view in VS Code, then selectLaunch VS Code Extensionfrom the dropdown menu.Check that the file preview link exists in the web app
The web app uses the branded components also, so run
sg startorsg start web-standalone, do a search and see that the file preview link still exists.If you want to be an over-achiever, you can edit
client/branded/src/search-ui/results/StreamingSearchResultsList.tsx, changinghideFilePreviewButton = false,tohideFilePreviewButton = true,and reload the search results to see that the file preview link disappears.