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: Multi Root Workspaces #30722

Closed
3 tasks done
bpasero opened this issue Jul 14, 2017 · 5 comments
Closed
3 tasks done

Test: Multi Root Workspaces #30722

bpasero opened this issue Jul 14, 2017 · 5 comments
Assignees
Labels
testplan-item workbench-multiroot Multi-root (multiple folders) issues
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Jul 14, 2017

Test for: Multi Root Workspaces

Complexity: 5

In this milestone we rewrote how multi root workspaces surface in VS Code. The previous solution with having a workspace setting in user settings is obsolete (there is no migration). See #396 (comment) for more details on our approach.

Note: to see the workspace name in the window title (helps for testing), configure "window.title": "${activeEditorShort}${separator}${rootName}"

Basics
Most workspace related operations center around a new submenu under the file menu:

image

Try to work with multi root workspaces and play around with the available actions. Transition between empty workspaces, single folder workspaces and multi-root workspaces. Some things to keep an eye on:

  • explorer and search operations work as before in any of the contexts
  • you can save "Untitled Workspace" to some location on disk and open them from there
  • saving an untitled workspace works without requiring a window reload
  • you can switch saved workspaces via File > Open Recent as well as the recently opened picker (F1 >open recent)
  • you can add and remove root folders from a multi-root workspace
  • you see that you are inside a workspace by a new status bar color as well as the workspace name showing up in the explorer section for folders (only in our default dark and light theme)
  • workspaces that are opened will restore in the same way as folder do (you can set window.restoreWindows: all to restore multiple windows)
  • debugging (node.js and extension host debugging) work as before

Untitled Workspaces
Workspaces that are not saved are called "Untitled Workspace". Verify:

  • you get asked to save an untitled workspace when you load something else into the window or when you open a second window and close the first window with the untitled workspace
  • all of the actions from the question dialog work
  • untitled workspaces (not just the last active window but all windows) restore properly the next time you start up

Data
Once you are in a workspace context, we use the workspaces identifier to associate:

  • UI state (e.g. the files you have opened as tabs)
  • hot-exit state (e.g. dirty files you left dirty when quitting)
  • extension storage (a location on disk where extensions can store data via the ExtensionContext.storagePath API)

Verify:

  • UI state you have inside a workspace is restored next time you open it
  • dirty files are restored when you quit and reopen the workspace
  • extensions have a stable ExtensionContext.storagePath location per workspace

Settings

Once you are in a workspace context, workspace settings are no longer stored within the .vscode folder, but within the workspace file.

NOTE: Opening workspace settings in a Multi-root workspace currently shows the complete workspace config file. To show only Settings, is pending for next week.

Verify:

  • Defining workspace settings applies to whole workspace as usual.
  • Defining folder settings applies to resources under that folder. Currently following resource settings are supported.
editor.*
files.exclude
files.trimTrailingWhitespace
files.insertFinalNewLine
files.encoding
files.autoGuessEncoding
files.watcherExclude
search.exclude
  • Intelli-sense in workspace settings works.
  • Edit actions in Default Settings works correctly in all targets.
  • Actions to open Folder settings in Command Pallette.
@bpasero bpasero added this to the July 2017 milestone Jul 14, 2017
@bpasero bpasero added the workbench-multiroot Multi-root (multiple folders) issues label Jul 17, 2017
@glarue
Copy link

glarue commented Jul 17, 2017

Sorry in advance if this is the wrong place to put this question, but is there any way to achieve the following functionality?

I have folder A and folder B, both under separate git repos. I open file A1 from folder A and file B1 from folder B. When I am editing A1, git is processed via A; when editing B1, git switches to folder B.

@bpasero
Copy link
Member Author

bpasero commented Jul 18, 2017

@glarue currently not but we are working on SCM support for multi root scenarios.

@bpasero
Copy link
Member Author

bpasero commented Jul 19, 2017

@isidorn @weinand @chrisdias todays insider build should be good to go for testing 👍

@sandy081
Copy link
Member

@isidorn @weinand @chrisdias Please update to latest insiders for testing. Thanks.

@bpasero
Copy link
Member Author

bpasero commented Jul 20, 2017

@weinand @isidorn @chrisdias thanks so much for taking the time to test, you found awesome bugs ❤️

@bpasero bpasero closed this as completed Jul 20, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
testplan-item workbench-multiroot Multi-root (multiple folders) issues
Projects
None yet
Development

No branches or pull requests

6 participants