-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Show preview editors while navigating through quick open results #12892
Comments
@bpasero Would you be interested in an user contribution for this one? |
@XVincentX sure why not. the tricky part is that there are many listeners for when editors change and you do not want to trigger the same actions depending on wether the editor change is from this preview navigation or a real editor opening. Mainly you do not want to push to all history stacks we have (history.ts). In other words, opening editors like this from quick open should not add to history, only when the decision is made and you picked one. I think this needs to be wired in end to end to make it work properly. |
@bpasero I'll try to come up with something. I guess |
Hey, Basically I've started from
However, the
Selection change eventThis seems to be the hardest part. Am I on the right track? |
It turns out to be a bit more complicated than I was expecting. It seems like I'm restarting the thing from Complicated, but still interesting stuff here. |
@XVincentX the area you are looking into is unfortunately quite old and definitely needs some cleanup to make it easier to understand. I appreciate you taking the time to dig into. Luckily there is a way to find out if an entry was selected or not. Every quick open entry can implement the We need to add code here to support the I think the harder part is to find a way to prevent history etc. from adding this to their lists. I think every listener of |
@bpasero Let's see if I can come up with some other considerations! |
@bpasero Now I see two things:
I'll look into more eventually - let me know if I'm on the right track. |
Yes, |
I am afraid it does not then - as this code is not working as expected. |
@XVincentX can you file a bug? |
I'll try to track down the issue - if not I'll file a new one here 👍 It seems like this is exploding 💣 |
Quick update: the flag is working correctly in |
@XVincentX it works for me, you need to add the If the input is untyped ( Also the |
@bpasero As you can see I'm setting the I continued to track down the error and probably I found something interesting: Fundamentally if we have a look to the static from function you can see that it's returning an empty object in my case - which might actually be fine. The thing is that successively the same null object is passed in the Focus checking function which will find an undefined option and focus the editor by default. So it seems like the options suggest to not preserve the focus by default, while the editorParts is behaving in the opposite way (focusing by default) I've put up this which should fix the thing: https://github.com/XVincentX/vscode/commit/c855cb2397221a3308d78655853384acbe6ebc5f Anyway I still do not understand why you're just setting true in some cases and not simply copy or forward the Furthermore, it seems like the logic is wrong here
if Does all this make sense to you? P.S: I've opened a PR so we can discuss the lines directly there eventually. |
@XVincentX |
@bpasero Should this feature be enabled for everyone or - should it be behind a configuration entry? |
@XVincentX we had a UX meeting a while ago where we agreed that this should be the default behaviour 👍 . The reasoning is that we already update the UI while navigating the list for these areas:
Btw I would probably also expect this feature to work for the |
@bpasero I've pushed bunch of other commits and I have it almost working - please have a quick look eventually and be bad - unfortunately I'm entirely based on my intuitions and reverse-engineering capabilities, so I might be totally wrong. I'll keep going! |
Keep pushing, I am offline now and will check back tomorrow 👍 |
Added comments to the PR. |
I made a PR to implement this issue. I will circle back to be certain the history events are not stored. Would prefer to create a temporary buffer for files that can not be refs #13909 |
@XVincentX @wprater you two should probably talk, there are now 2 PRs open for the same issue and I would like to look at just one 👍 |
I had not seen this until after I was mostly done. :( My PR had the benefit of recognizing the state of your editors when you cancel out of the quick open dialog. @XVincentX let me know if you wanted me to merge anything to mine. I think you're AWK for a week, so Im more than happy to close this out. |
I'll be out for the entire week. Feel free to step in |
Any update for this PR? This function is so useful! |
I was working on this but then @wprater claimed to be almost done with it...you guys tell me! |
Sorry, did not mean to close this one (somehow I thought this was the PR). Short story is that there is a core piece missing in the workbench UI which is to be able to open editors as a new kind of "preview" where they would not even cause a tab to open nor events to trigger (e.g. opened editors would not even see it). Very similar to how in Sublime an untitled file does not turn into a tab before starting to type: This is the concept we need for the picker to be able to show a preview without causing too much updating of the underlying tabs world. Since I do not feel this is something that should come in via "help wanted", I am removing the label. |
Any update for this PR? |
I want this. Is there a PR with meaningful progress I could hack on? If not I'm going to try and do a really really simple version of this where I generate images from everything in the cache and flash that across the screen. It probably won't respect theming and stuff like that, but it'll be better than nothing. |
Duplicate of #8939 |
I think it would be really useful to open a temporary editor while searching with CMD+P and open the first file found in the list so I can have an immediate feedback without having to guess what's inside.
The text was updated successfully, but these errors were encountered: