microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.7k stars 29.45k forks source link

Sidebar always comes back in empty workspaces #13825

Closed TheIndifferent closed 8 years ago

TheIndifferent commented 8 years ago

Often using VSC to do something real quick, like change arguments in URL or catch the terminal output, would be helpful to start with hidden side bar.

garfieldbanks commented 8 years ago

Yeah I hate this.

isidorn commented 8 years ago

If you hide the sidebar the next time you open vscode it would have the sidebar hidden. Though adding an explicit option is a feature request thus assigning to @bpasero

garfieldbanks commented 8 years ago

@isidorn

Doesn't work. Unless Ctrl+B doesn't count as hiding the sidebar.

Also, every git command that opens a vscode editor has the sidebar. I press Ctrl+B every time and it just keeps coming back. This can be extra annoying sometimes if I've just used the find all and had the sidebar in a huge state.

bpasero commented 8 years ago

@garfieldbanks @TheIndifferent are you opening a folder with VS Code or opening empty/single file? Do you see the sidebar when opening a folder or with VSCode opening empty/single file?

I suspect this could be the experiments for these people to cause the sidebar to always show when opening single file / empty workspace.

garfieldbanks commented 8 years ago

@bpasero

OK I just tested opening code from the terminal like this:

code .

And this DOES preserve the sidebar being hidden (like @isidorn said) after I close the window and reopen it with:

code .

However I don't usually actually open vscode like this. I have it set to never reopen any folders. Maybe that will help isolate the problem.

I usually open vscode with a shortcut bound to a hotkey. The shortcut uses:

code -n

I then press Ctrl+R to open the recently open folders and press enter on the one I want to open.

Every time, after hiding the sidebar, closing the editor window, and opening a new editor window, the sidebar has been reset to visible.

TheIndifferent commented 8 years ago

My usecase is much simpler:

  1. put an icon to the Dock.
  2. need to edit a small piece of text real quick - click an icon, VSC starts with sidebar visible, press CMD+B to hide the sidebar, press CMD+N and paste text there.
  3. after you're done - press CMD+Q to quit the VSC.
  4. need to edit another piece of text - click an icon, VSC starts with sidebar visible again.
garfieldbanks commented 8 years ago

I can verify this in Windows 10 as well.

Place a simple shortcut to vscode on the desktop (without any command line parameters).

Open vscode using desktop shortcut.

Press Ctrl+B to close the sidebar.

Press Ctrl+Shift+W to close vscode.

Reopen vscode using desktop shortcut.

Verify that sidebar has been reset to visible.

bpasero commented 8 years ago

@garfieldbanks @TheIndifferent can you please upload a screenshot for when VS Code shows the sidebar when you do NOT expect it.

garfieldbanks commented 8 years ago

image

garfieldbanks commented 8 years ago

hellogoodbye

garfieldbanks commented 8 years ago

It just keeps coming back to say hello.

bpasero commented 8 years ago

@garfieldbanks @TheIndifferent can you try setting this in settings:

"telemetry.experiments.showDefaultViewlet": false

garfieldbanks commented 8 years ago

Yup. That fixes it.

bpasero commented 8 years ago

We need to disable these experiments as they cause unexpected and indeterministic behaviour.

Unless objections, I will revert them ( @egamma @seanmcbreen @chrmarti fyi).

bpasero commented 8 years ago

I deleted all experiments besides the watermark experiment. Though I argue it should just be enabled by default.

egamma commented 8 years ago

CC @kieferrm

kieferrm commented 8 years ago

@bpasero disabling the experiments is not quite the right solution to the issue @TheIndifferent and @garfieldbanks are seeing. It would make it impossible for us to improve our understanding how to better help first time users.

The issue comes to light because we don't remember the state for the sidebar if the user does not have an open workspace. I.e. when in an older version you make the sidebar visible without opening a folder and restart code you will not get your sidebar back.

Since we are not interested in changing the behavior for returning users, I'll attach a PR that filters based on first time usage.

bpasero commented 8 years ago

@kieferrm sounds good, I have opened https://github.com/Microsoft/vscode/issues/14009

As far as this issue goes, it is resolved by setting "telemetry.experiments.showDefaultViewlet": false for now.