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

Search Files By Name Should Use Highlighted Text #194573

Open
machineghost opened this issue Oct 1, 2023 · 12 comments · May be fixed by #197380
Open

Search Files By Name Should Use Highlighted Text #194573

machineghost opened this issue Oct 1, 2023 · 12 comments · May be fixed by #197380
Assignees
Labels
feature-request Request for new features or functionality quick-open Quick-open issues (search, commands)
Milestone

Comments

@machineghost
Copy link

machineghost commented Oct 1, 2023

This has already been reported (and closed) as both #59957 and #97911.

This would be a great convenience: please stop closing it and just implement it :)

@nikhilkarve
Copy link

Can I take this up? I want to start contributing however possible, this would be my first issue, but I can give it a try.

@andreamah andreamah assigned TylerLeonhardt and unassigned andreamah Oct 3, 2023
@TylerLeonhardt TylerLeonhardt added feature-request Request for new features or functionality quick-open Quick-open issues (search, commands) labels Oct 3, 2023
@TylerLeonhardt
Copy link
Member

@machineghost you linked the same issue twice... was there another one you're referring to?

@vscodenpa vscodenpa added this to the Backlog Candidates milestone Oct 3, 2023
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@machineghost
Copy link
Author

@machineghost you linked the same issue twice... was there another one you're referring to?

Yes, #97911 (I edited my original post).

@TylerLeonhardt
Copy link
Member

@nikhilkarve you're welcome to try and take this on. Unfortunately, I can't help a ton as I do have a lot on my plate at the moment.

You can see what the new quickTextSearch is doing here:

const activeEditor: IEditor = editorService.activeTextEditorControl as IEditor;

and follow that kind of pattern for implementing it. You'll want to add this to here:

registerAction2(class QuickAccessAction extends Action2 {
constructor() {
super({
id: 'workbench.action.quickOpen',
title: {
value: localize('quickOpen', "Go to File..."),
original: 'Go to File...'
},
description: {
description: `Quick access`,
args: [{
name: 'prefix',
schema: {
'type': 'string'
}
}]
},
keybinding: {
weight: KeybindingWeight.WorkbenchContrib,
primary: globalQuickAccessKeybinding.primary,
secondary: globalQuickAccessKeybinding.secondary,
mac: globalQuickAccessKeybinding.mac
},
f1: true
});
}
run(accessor: ServicesAccessor, prefix: undefined): void {
const quickInputService = accessor.get(IQuickInputService);
quickInputService.quickAccess.show(typeof prefix === 'string' ? prefix : undefined, { preserveValue: typeof prefix === 'string' /* preserve as is if provided */ });
}
});

@nikhilkarve
Copy link

Sure, @TylerLeonhardt . I would love to try. And it's fine, if you don't mind I can post the questions here if I get any, you can answer anytime you are available. Is that okay?

@nikhilkarve
Copy link

Hello @TylerLeonhardt . I think I have implemented what is required. Attaching a small screen recording. Let me know if this is what's needed.

Screen.Recording.2023-10-05.at.12.39.39.AM.mov

Also, a quick question. As you suggested I made the changes to vscode/src/vs/workbench/browser/actions/quickAccessActions.ts

One thing I did is, I imported the following.
import { getSelectionTextFromEditor } from 'vs/workbench/contrib/search/browser/searchView';

But I am getting the error while committing saying the import is not allowed. I am not sure how to use that function here or shall I rewrite it in the browser folder? If you can just point me on how imports should be managed, I will work on that.

@nikhilkarve
Copy link

I tried making a change for me to be able to make a PR. Let me know if this is a correct way of doing it. I may have made a mistake as this is my first time. I will update as soon as I get a reply. Thank you!

Here is the PR
#194906

@vscodenpa
Copy link

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@machineghost
Copy link
Author

Who cares about votes? It has a fix ready.

@nikhilkarve
Copy link

Hey @TylerLeonhardt , I just checked that it was moved to backlog. Let me know if there is anything needed to be done my side. Would try to wrap it up quickly. Thanks:)

@nikhilkarve
Copy link

@TylerLeonhardt @machineghost @andreamah
Hello all!
How are y'all doing? It's been around a year.. are we planning to merge it? I can create a new PR if needed? Shall I go ahead and do it or are we planning to wait for some time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality quick-open Quick-open issues (search, commands)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants