-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
List: Support a different navigation mode where focus and selection move together #118045
Comments
I found that some of the tree is already doing that, for example the Problems View, which is an This is because
and then vscode/src/vs/platform/list/browser/listService.ts Lines 617 to 619 in 828f99e
vscode/src/vs/platform/list/browser/listService.ts Lines 631 to 633 in 828f99e
The problem with this special logic is, As we discussed this morning, a new flag/option will be introduced for this behavior and we should get rid of |
The new @roblourens @sandy081 This can now be adopted in Search and Problems and you can very likely remove some annoying code you must have created to keep both focus and selection in sync. @rebornix When adopted, can you mark as |
I forgot that the |
Oh I forgot about that, that's exactly what search, problems, etc are using. Let me see if I can clean up that one, I do look at it more as a hack, and adopt the new one instead. |
This is now adopted in search, peek references, bulk edit, comments and markers. Thanks @roblourens for reminding me of |
Thanks @joaomoreno |
Now search doesn't open on focus anymore. Is there something else I need to do? |
What do you mean? How can I repro? |
Use the arrow keys to move focus around the search view tree, this is expected to fire onDidOpen Mar-16-2021.10-52-26.mp4 |
Oh I see, this only works if there is already a selection. If there is no selection then one is not added. I am getting here by starting with focus in the search input then pressing cmd+down to move focus to the tree. Should i work around it by havingn SearchView setting a selection when this happens, or do you expect the tree to handle this? |
I think the tree should handle it, I can fix it! |
Thanks! |
I think this is basically the same case but test F4 navigation as well: #119199 |
Looking into the code, I ended up fixing it at search level. @roblourens could you maybe verify? |
The text was updated successfully, but these errors were encountered: