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

Web: Zen mode and refresh is stuck in centered layout #82597

Closed
bpasero opened this issue Oct 15, 2019 · 5 comments
Closed

Web: Zen mode and refresh is stuck in centered layout #82597

bpasero opened this issue Oct 15, 2019 · 5 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code web Issues related to running VSCode in the web
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Oct 15, 2019

  • Toggle Zen mode
  • Reload window
  • You are out of Zen mode, but the editor is still in centered layout. I'd expect myself to be either 1) completely out of Zen mode without centered layout 2) completely in Zen mode with centered layout

image

@isidorn reply:

The issue is that zenMode is potentially toggling zen mode on onWillSaveState to cleanse the state here

This is an ugly approach which does not work in the web

@bpasero bpasero added bug Issue identified by VS Code Team member as probable bug web Issues related to running VSCode in the web labels Oct 15, 2019
@bpasero bpasero added this to the October 2019 milestone Oct 15, 2019
@isidorn
Copy link
Contributor

isidorn commented Oct 23, 2019

I actually have no better idea when should I clean the zen mode state.
@bpasero is there a better time to do this in the web? Currently I listen to onWillSaveState

An ideal option is that zen mode just stores that it is active in memory and next time we start eveyrthing is clean. However zen mode is piggy backing on a lot of other features which need to be cleaned since they are stored across reloads (for example activity bar gets hidden)

Thus zen mode has to do something on shutdown.

Alterantive woudl be to change the whole zen mode implementation.

@isidorn isidorn modified the milestones: October 2019, On Deck Oct 23, 2019
@bpasero
Copy link
Member Author

bpasero commented Oct 24, 2019

@isidorn you will have to find a solution that does not require any long running operations on reload or shutdown, there is no way in the web to support this currently. If you must persist state on shutdown, window.localStorage is an option (as it is sync and blocks the unload). I think it is fine to be used if we do not store too much in it. I use it already in another case for other reasons.

@bearpro
Copy link

bearpro commented Mar 4, 2020

I have the same issue on a stable standalone version after my laptop with windows been hibernated due to this battery run down.

Version: 1.42.1 (system setup)
Commit: c47d83b
Date: 2020-02-11T14:45:59.656Z
Electron: 6.1.6
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363

@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Apr 7, 2020
@SpicyPete
Copy link

it's out of scope, but how do I get VS Code to not be stuck centered again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug *out-of-scope Posted issue is not in scope of VS Code web Issues related to running VSCode in the web
Projects
None yet
Development

No branches or pull requests

5 participants
@SpicyPete @bpasero @isidorn @bearpro and others