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

Customize custom view height #122283

Closed
Tracked by #1
HuihuiWu-Microsoft opened this issue Apr 27, 2021 · 6 comments · Fixed by #161244
Closed
Tracked by #1

Customize custom view height #122283

HuihuiWu-Microsoft opened this issue Apr 27, 2021 · 6 comments · Fixed by #161244
Assignees
Labels
api api-finalization feature-request Request for new features or functionality on-testplan tree-views Extension tree view issues

Comments

@HuihuiWu-Microsoft
Copy link

HuihuiWu-Microsoft commented Apr 27, 2021

As you can see, the 'open editors' view has dynamic height according to its content. Can we customize our view( which in inside custom view container) height like that?
image

@isidorn
Copy link
Contributor

isidorn commented Apr 27, 2021

Open editors has some custom code for doing this https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/files/browser/views/openEditorsView.ts#L418

I believe this is not possible with custom views, and I think is a feature request against custom views thus forwarding to @alexr00

@isidorn isidorn assigned alexr00 and unassigned isidorn Apr 27, 2021
@isidorn isidorn added the tree-views Extension tree view issues label Apr 27, 2021
@alexr00 alexr00 added the feature-request Request for new features or functionality label Apr 27, 2021
@alexr00 alexr00 added this to the Backlog Candidates milestone Apr 27, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2021
@joaomoreno joaomoreno reopened this Jul 6, 2022
@alexr00
Copy link
Member

alexr00 commented Jul 19, 2022

Notes about proposal:

/**
* View contributions can include a `size`, which can be `fit` or a number. Using a number works similar to the css flex property.
*
* For example, if you have 3 views, with sizes 1, 1, and 2, the views of size 1 will together take up the same amount of space as the view of size 2.
*
* A view with `size` `fit` will try to fit the contents of the view. Currently only supported for tree views.
*
* A number value will only be used as an initial size.
* A 'fit' value will always be respected.
*/

Example

{
					"id": "prStatus:github",
					"name": "Changes In Pull Request",
					"when": "github:inReviewMode && !github:createPullRequest",
					"icon": "$(git-pull-request)",
					"visibility": "visible",
					"size": "fit"
				},
				{
					"id": "github:activePullRequest",
					"type": "webview",
					"name": "Active Pull Request",
					"when": "github:inReviewMode && github:focusedReview && !github:createPullRequest",
					"size": 1
				},

@alexr00 alexr00 modified the milestones: July 2022, August 2022 Jul 26, 2022
@alexr00
Copy link
Member

alexr00 commented Aug 16, 2022

Example with the latest proposal

				{
					"id": "github:createPullRequest",
					"type": "webview",
					"name": "Create Pull Request",
					"when": "github:createPullRequest",
					"visibility": "visible",
					"initialSize": 2
				},
				{
					"id": "github:compareChanges",
					"name": "Compare Changes",
					"when": "github:createPullRequest",
					"visibility": "visible",
					"initialSize": 1
				},

@alexr00 alexr00 modified the milestones: August 2022, September 2022 Aug 18, 2022
alexr00 added a commit that referenced this issue Sep 19, 2022
alexr00 added a commit that referenced this issue Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-finalization feature-request Request for new features or functionality on-testplan tree-views Extension tree view issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@joaomoreno @isidorn @alexr00 @HuihuiWu-Microsoft and others