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

Test: locked editor groups #131196

Closed
2 tasks done
bpasero opened this issue Aug 19, 2021 · 0 comments
Closed
2 tasks done

Test: locked editor groups #131196

bpasero opened this issue Aug 19, 2021 · 0 comments

Comments

@bpasero
Copy link
Member

bpasero commented Aug 19, 2021

Refs: #124709

Complexity: 5

Create Issue


Motivation
Ever since terminals can appear as editors, users have asked for a more stable editor layout where you can have terminals to the side remaining visible even as more editors are opened:

Screenshot 2021-08-19 at 18 43 08

As we know, once a group is active (has keyboard focus) and you click on any file (e.g. explorer, quick open), the active editor is replaced by the new editor. This makes it quite annoying to work with terminals as editors because they are potentially replaced with other editors all the time.

Locked editor groups are the idea to solve this problem.

Behaviour

  • a locked editor group will not open editors in unless explicitly decided by the user (e.g. from a drag & drop operation)
  • locking state can be toggled per editor group only when more than 1 editor group is opened
  • locking state can optionally be automatically enabled based on the kind of editor that opens in a group and based on a new setting that was added
  • locking only applies when more than 1 group is opened (i.e. nothing changes if just 1 group is opened)

Test: Basics

  • make sure to have more than one editor group opened
  • editor groups can be locked from the "..." menu in the editor toolbar and unlocked from the "..." menu or from the 🔒 icon that appears for locked groups only
    • the entry in the "..." menu always reflects the locked state of the group even when you click on the "..." for a group that is not active
  • once a group is locked, files you open from explorer or quick open will not open in the locked group but in a different group
    • if some groups are unlocked, the most recently used one will be used as target
    • if all groups are locked, a new group will open automatically
    • if a locked group's active editor is identical with the one to open, that group will still be used as target
  • you can still "force" an editor to open in a locked group via drag and drop
    • similar a double click on the empty space next to a tab will open a untitled editor even in a locked group
  • locked state is preserved across window reloads
  • locked state is cleared as soon as you are back to 1 group (e.g. a locked side group will appear normally once you closed the other group)
  • there are commands to toggle lock, unlock and lock the active editor group

Test: Empty Groups

  • use one of the layouts we provide to forcefully create empty groups (e.g. 2x2 layout)
  • you can lock an empty group from the context menu anywhere on the empty space
  • a locked empty group indicates locked state by replacing the "X" icon with a lock
  • you can unlock and then close the locked empty group with 2 clicks there
  • configure workbench.editor.closeEmptyGroups: false
  • open multiple groups with editors and lock some
  • verify that closing all editors of a locked group will indicate the locked state as before in the empty group

Test: workbench.editor.experimentalAutoLockGroups
For the scenario of terminal editors, a setting was added to automatically lock a group when a terminal opens as first editor.

  • read and understand the workbench.editor.experimentalAutoLockGroups setting and verify it makes sense to you
  • open a integrated terminal in a side group (e.g. from the command palette or via DND)
  • verify the new group is locked by default
  • verify you can disable this feature by changing the setting
  • verify you can enlist more editors to behave like this (e.g. markdown preview: workbench.editors.webviewInput)
@bpasero bpasero added this to the August 2021 milestone Aug 19, 2021
@ghost ghost assigned aeschli and sbatten Aug 24, 2021
@aeschli aeschli removed their assignment Aug 24, 2021
@sbatten sbatten closed this as completed Aug 24, 2021
@sbatten sbatten removed their assignment Aug 24, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants