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

Aux window: from explorer select or open editor in most recently used group across all windows #200495

Closed
Tracked by #200518
abrahan-munro opened this issue Dec 10, 2023 · 20 comments
Labels
feature-request Request for new features or functionality workbench-auxwindow Issues related to use of auxiliary ("floating") windows.

Comments

@abrahan-munro
Copy link

abrahan-munro commented Dec 10, 2023

Selecting a file in explorer selects or opens it in the most recently used editor group in the main window. It should also consider floating windows and select or open it in the most recently used editor group across all windows.

Likewise for any other interaction with the side bar or panel that selects or opens an editor. E.g. selecting a problem in the problems panel correctly uses the most recently used editor for that file in all windows, however selecting a change in the source control side bar always uses the main window.

I want to use the main window for the side bar and panel only, and have all editors in floating windows.

Possibly related:

@abrahan-munro abrahan-munro changed the title [workbench-auxwindow] from explorer select or open editor in most recently used group across all windows Aux window: from explorer select or open editor in most recently used group across all windows Dec 11, 2023
@bpasero bpasero added feature-request Request for new features or functionality workbench-auxwindow Issues related to use of auxiliary ("floating") windows. labels Dec 11, 2023
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone Dec 11, 2023
@VSCodeTriageBot
Copy link
Collaborator

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!

@bpasero
Copy link
Member

bpasero commented Dec 11, 2023

The challenge here is that once the main window focuses, its editor group becomes the most recent active one.

You can get there if you "Lock" the main group in the main window:

image

This will target all open editor operations to other groups that are not locked, including floating windows.

@abrahan-munro
Copy link
Author

"Lock" the main group in the main window

That works well, thanks very much for the tip!

However, in order to lock the group in the main window I needed 2 groups in the main window. So I created a new file in one group and split the view into a new group, then I could lock both groups and expand the panel. If I select "Lock Group" when there is only a single group in the main window it does nothing, even if there is another group in a floating window.

@bpasero
Copy link
Member

bpasero commented Dec 11, 2023

Can you give some exact steps for me to reproduce? It is true that we do not allow group locking if you only have 1 group opened in total across all windows, but it sounds like you found a bug maybe.

@abrahan-munro
Copy link
Author

abrahan-munro commented Dec 11, 2023

Can you give some exact steps for me to reproduce?

  1. Close all floating windows and all editor groups in the main window
  2. Select a file in explorer in side bar (opens in new editor group in main window)
  3. Move editor group into new window (no editor group in main window)
  4. Select a different file in explorer in side bar (opens in new editor group in main window)
  5. Select "Lock Group" in main window editor group menu (nothing happens, no lock icon appears, menu item has no check mark)
  6. Select Split Editor Right icon in main window editor group (opens in new editor group in main window)
  7. Select "Lock Group" in menu of both main window editor groups (both groups lock, locked lock icon appears, menu item has check mark)

@abrahan-munro
Copy link
Author

abrahan-munro commented Dec 11, 2023

we do not allow group locking if you only have 1 group opened in total across all windows

That restriction does not seem to be necessary, since it is permitted to lock all groups, and when all groups are locked, a new group is automatically created in the main window when needed.

@bonzzo2014 bonzzo2014 mentioned this issue Dec 11, 2023
@gjsjohnmurray
Copy link
Contributor

Changes in #200039 may be relevant. @abrahan-munro can you test with latest Insiders?

@bpasero
Copy link
Member

bpasero commented Dec 11, 2023

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

@vdegenne
Copy link

vdegenne commented Dec 11, 2023

Likewise for any other interaction with the side bar or panel that selects or opens an editor. E.g. selecting a problem in the problems panel correctly uses the most recently used editor for that file in all windows

Not having this behavior here, If I click a problem from the main window it opens the file in a new tab in the main window even though it is already opened in an aux window somewhere else (which is counter-intuitive).

Hope to see "sidebar as an aux window" and "do not reopen a file but focus it if it's somewhere in an aux window" feature soon.

But so far auxiliary windows are really useful, thanks guys.

@bpasero
Copy link
Member

bpasero commented Dec 11, 2023

@vdegenne there is a setting which will help: workbench.editor.revealIfOpen

@abrahan-munro
Copy link
Author

@gjsjohnmurray @bpasero With the current insider build I can lock the single group in the main window if I have another group in a floating window.

@abrahan-munro
Copy link
Author

once the main window focuses, its editor group becomes the most recent active one.

Can that behaviour be considered a bug? If I have multiple editor groups in the main window it is tracking which is the most recent active one based on direct interaction with the group. So interaction with the main window outside the group shouldn't be counted, whether or not I'm changing focus from another window?

@abrahan-munro
Copy link
Author

abrahan-munro commented Dec 11, 2023

Also, it'd be nice to be able to lock the empty editor group area (with no editors open) in the main window, so that the placeholder locked group doesn't throw off the Control-<number> shortcut numbering.

@bpasero
Copy link
Member

bpasero commented Dec 12, 2023

The current rule is that you cannot lock the main group when no other group is opened but I wonder if we should simply drop this given it makes working with floating windows harder.

Our original rationale was that users might be stuck in the main group refusing to open editors even when all other groups are closed, so we simply unlock.

@vdegenne
Copy link

It would be nice to have an option to open a file in the most recently used auxiliary window, regardless of whether it should be opened in a group or not.
Having to lock groups to instruct VSCode to open a file in the most recently used auxiliary window is unintuitive.

@VSCodeTriageBot
Copy link
Collaborator

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!

@abrahan-munro
Copy link
Author

@bpasero

The current rule is that you cannot lock the main group when no other group is opened but I wonder if we should simply drop this given it makes working with floating windows harder.

Our original rationale was that users might be stuck in the main group refusing to open editors even when all other groups are closed, so we simply unlock.

That restriction does not seem to be necessary anyway, since it is permitted to lock all groups when there are more than one, and when all groups are locked, a new group is automatically created in the main window when needed. So, this should also be the case when there is only one group.

@abrahan-munro
Copy link
Author

@bpasero

once the main window focuses, its editor group becomes the most recent active one.

Can that behaviour be considered a bug? If I have multiple editor groups in the main window it is tracking which is the most recent active one based on direct interaction with the group. So interaction with the main window outside the group shouldn't be counted, whether or not I'm changing focus from another window?

Should I make a bug report for this?

@VSCodeTriageBot
Copy link
Collaborator

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2024
@abrahan-munro
Copy link
Author

abrahan-munro commented Mar 4, 2024

Also, it'd be nice to be able to lock the empty editor group area (with no editors open) in the main window, so that the placeholder locked group doesn't throw off the Control-<number> shortcut numbering.

This is slightly improved in the current release. Move an editor or editor group into an aux window, lock the default group, then close all editors in the default group. The empty default group now stays locked. However, it still takes the Control-1 shortcut.

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 workbench-auxwindow Issues related to use of auxiliary ("floating") windows.
Projects
None yet
Development

No branches or pull requests

6 participants