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

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

Merged
merged 4 commits into from Jul 16, 2019

Conversation

@skprabhanjan
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Jul 10, 2019

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

This comment has been minimized.

Copy link
Contributor Author

commented Jul 11, 2019

@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

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2019

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

@roblourens

This comment has been minimized.

Copy link
Member

commented Jul 15, 2019

But does it do the right thing for a folder?

@skprabhanjan

This comment has been minimized.

Copy link
Contributor Author

commented Jul 16, 2019

@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)

@roblourens
Copy link
Member

left a comment

Looks good, thanks!

@roblourens roblourens merged commit 6d49c7a into microsoft:master Jul 16, 2019

5 checks passed

VS Code Build #20190716.9 succeeded
Details
VS Code (Linux) Linux succeeded
Details
VS Code (Windows) Windows succeeded
Details
VS Code (macOS) macOS succeeded
Details
license/cla All CLA requirements met.
Details

@roblourens roblourens added this to the July 2019 milestone Aug 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.