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

View size set when registering views is ignored in split view #37189

Closed
ramya-rao-a opened this issue Oct 30, 2017 · 4 comments
Closed

View size set when registering views is ignored in split view #37189

ramya-rao-a opened this issue Oct 30, 2017 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug extensions Issues concerning extensions layout General VS Code workbench layout issues verified Verification succeeded
Milestone

Comments

@ramya-rao-a
Copy link
Contributor

ramya-rao-a commented Oct 30, 2017

The default view of the Extensions viewlet uses split view to show 2 views
View for Installed extensions is registered with size 200. https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts#L148
View for Recommended extensions is registered with size 600. https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/extensions/electron-browser/extensionsViewlet.ts#L170

To ensure the sizes in local storage arent used, comment this line: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/browser/parts/views/viewsViewlet.ts#L651

Now run vscode from source and go to extensions viewlet.
You will see that the first section takes up most of the space and the second section gets the minimum height.

I was able to trace it down to the resize method in the splitView.ts. It first applies the item.view.minimumSize to both the views. Then in the subsequent calls to resize, the second view maintains the min size and rest of the space gets allocated to the first view.

@vscodebot vscodebot bot added the extensions Issues concerning extensions label Oct 30, 2017
@ramya-rao-a ramya-rao-a added this to the October 2017 milestone Oct 30, 2017
@ramya-rao-a ramya-rao-a self-assigned this Oct 30, 2017
@joaomoreno
Copy link
Member

@sandy081 This is slightly related to #36887, which we talked about last week. It's the same behavioural outcome.

But your ViewsViewlet, on first registration of the panels, could and should resize the panels to their right sizes. I'll leave that to you.

@joaomoreno joaomoreno removed their assignment Oct 31, 2017
@sandy081 sandy081 modified the milestones: October 2017, November 2017 Nov 1, 2017
@mikes-gh
Copy link

mikes-gh commented Nov 1, 2017

I am not sure if @joaomoreno means the above post as a fix.
I have the same issue.
Resizing the installed extension view is reset on restarting vscode.
It alwys seems to reset to only show 2 extensions out of the 9 I have installed.
I would have thought the view would resize to include all installed extensions.

@sandy081 sandy081 added the bug Issue identified by VS Code Team member as probable bug label Nov 3, 2017
@sandy081 sandy081 modified the milestones: November 2017, December 2017 Dec 4, 2017
@sandy081 sandy081 added the layout General VS Code workbench layout issues label Dec 4, 2017
@sandy081
Copy link
Member

@ramya-rao-a Fixed this.

May I know if you prefer to have a new id for extensions views state? Or is it ok to continue with current? I would prefer to continue with current, it will retain the users state.

@sandy081
Copy link
Member

To verify,

  • Have some extensions installed
  • Open VS Code in a new user data director code-insiders --user-data-dir <new dir>
  • Open Extensions viewlet
  • Installed section should take 30% and Recommended section should take 70%

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 26, 2018
@ramya-rao-a ramya-rao-a added the verified Verification succeeded label Feb 1, 2018
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 extensions Issues concerning extensions layout General VS Code workbench layout issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants