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

Panel size is not remembered correctly when panel is moved to the right #85451

Closed
klaussner opened this issue Nov 23, 2019 · 10 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug layout General VS Code workbench layout issues verified Verification succeeded
Milestone

Comments

@klaussner
Copy link

  • VSCode Version: 1.41.0-insider
  • OS Version: macOS 10.15

Steps to Reproduce:

  1. Open a new window and the panel.
  2. Move the panel to the right.
  3. Make the panel bigger.
  4. Close the window and open a new one.
  5. Open the panel.
  6. The panel opens at the bottom instead of on the right and it's too big.

Video of the reproduction steps: https://streamable.com/fkcox.

Does this issue occur when all extensions are disabled?: Yes

@vscodebot
Copy link

vscodebot bot commented Nov 23, 2019

@sbatten sbatten added bug Issue identified by VS Code Team member as probable bug layout General VS Code workbench layout issues labels Nov 26, 2019
@sbatten sbatten added this to the November 2019 milestone Nov 26, 2019
@sbatten
Copy link
Member

sbatten commented Nov 26, 2019

The problem is that the panel position is not being saved on window close but on shutdown. This won't reproduce on Windows or Linux for that reason (window close = shutdown).

@sbatten sbatten modified the milestones: November 2019, December 2019 Dec 6, 2019
@sbatten
Copy link
Member

sbatten commented Dec 13, 2019

Ignore my previous statement, the correct root cause is that when a new empty window is created on macOS and VS Code is already running(even without a window), the new window is always a new workspace id. However, from a cold start (VS Code is not running), the new empty window uses the same workspace id as before.

Panel position and visibility are stored in workspace storage and therefore in the repro case, do not exist. The size is written to global storage so it is restored.

@bpasero Does this workspace id generation sound correct? It seems strange that a new window from cold and hot starts give differing results if no windows are open from the beginning.

For the panel state, I could check if this is an empty workspace and just ignore workspace storage and revert to defaults. But, I want to check that this is how storage is expected to work.

@bpasero
Copy link
Member

bpasero commented Dec 14, 2019

This is correct, macOS has the concept of running apps even without windows. If you then go and click the app, it will open a new empty window with new workspace id. Starting VSCode when it is not running will restore any previous workspaces, including empty ones.

@sbatten
Copy link
Member

sbatten commented Dec 14, 2019

Still seems strange to treat clicking the app icon differently when no windows are open based on the app running in the background. But perhaps that's what Mac users expect

@bpasero
Copy link
Member

bpasero commented Dec 14, 2019

@sbatten my understanding is that clicking on the app icon when no window is open acts like "New Window" and not "Restore Window from Previous Session".

@sbatten
Copy link
Member

sbatten commented Dec 16, 2019

I've updated the restoration logic to ignore the global storage panel size when we aren't restoring positions but rather just using defaults.

sbatten added a commit that referenced this issue Dec 18, 2019
This reverts commit 8b7742f.
sbatten added a commit that referenced this issue Dec 18, 2019
@sbatten
Copy link
Member

sbatten commented Dec 18, 2019

new fix is similar but will restore size if the position matches the last saved panel size

@RMacfarlane RMacfarlane added the verified Verification succeeded label Jan 29, 2020
@RMacfarlane
Copy link
Contributor

@sbatten What's the expected behavior now?

Following the original repro steps, I still see the panel being restored to the bottom instead of the right

@RMacfarlane RMacfarlane removed the verified Verification succeeded label Jan 29, 2020
@sbatten
Copy link
Member

sbatten commented Jan 29, 2020

@RMacfarlane Following the original steps should show the panel at the bottom, but the size should be appropriate.

@RMacfarlane RMacfarlane added the verified Verification succeeded label Jan 29, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug layout General VS Code workbench layout issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants