Skip to content

Fix-75259 - Interact with files in search results#76828

Merged
roblourens merged 4 commits intomicrosoft:masterfrom
skprabhanjan:fix-75259
Jul 16, 2019
Merged

Fix-75259 - Interact with files in search results#76828
roblourens merged 4 commits intomicrosoft:masterfrom
skprabhanjan:fix-75259

Conversation

@skprabhanjan
Copy link
Contributor

@skprabhanjan skprabhanjan commented Jul 8, 2019

@roblourens , I added "Reveal in Side Bar" menu to search to fix #75259 but there seems to be one issue .
When I use "Reveal in Side Bar" from the title then it switches to explorer and highlights the correct file in explorer .
I have added the same way but when I click on the new menu option I added in search , it takes me to the explorer but highlights the file that is shown in the editor and not the one I asked to Reveal in side bar.

Added a small video of the same for better understanding , Can you please help me out on this ? ( If some other event is causing the highlighting on click or something ?? )

@roblourens
Copy link
Member

That command will try to get the currently selected row and it will probably be trying to get it from the explorer view, not the search view. You will probably need a new command that can get the current file from the search view.

@skprabhanjan
Copy link
Contributor Author

@roblourens , Yes i figured it out and changed it accordingly .
Works perfectly now , Please review it and let me know if anything needs to be changed :)

@skprabhanjan
Copy link
Contributor Author

@roblourens , All the changes are done :)
For the ResourceContextKey not hooked up in search view issue , I reused Constants.FileMatchOrFolderMatchFocusKey, This works fine .

@roblourens
Copy link
Member

But does it do the right thing for a folder?

@skprabhanjan
Copy link
Contributor Author

@roblourens , sorry forgot to add that change.
Now the "Reveal in Explorer" comes up only for a file (Not enabled when clicked on a folder or a match)

Copy link
Member

@roblourens roblourens left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@roblourens roblourens merged commit 6d49c7a into microsoft:master Jul 16, 2019
@roblourens roblourens added this to the July 2019 milestone Aug 2, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interact with files in search results

2 participants