Skip to content

Customize custom view height #122283

Closed

Description

@HuihuiWu-Microsoft

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

Activity

  1. isidorn commented on Apr 27, 2021

    @isidorn

    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 Alex Ross (@alexr00)

  2. added
    tree-views
    on Apr 27, 2021
  3. added
    feature-request
    on Apr 27, 2021
  4. vscode-triage-bot commented on Apr 27, 2021

    @vscode-triage-bot

    This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  5. vscode-triage-bot commented on Jun 17, 2021

    @vscode-triage-bot

    This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  6. vscode-triage-bot commented on Jun 28, 2021

    @vscode-triage-bot

    🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

    Happy Coding!

  7. locked and limited conversation to collaborators on Aug 12, 2021
  8. alexr00 commented on Jul 19, 2022

    @alexr00
    Member

    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
    				},
    
  9. alexr00 commented on Aug 16, 2022

    @alexr00
    Member

    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
    				},
    
  10. added a commit that references this issue on Sep 19, 2022
    87ae221
  11. added a commit that references this issue on Sep 19, 2022
    8243100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apiapi-finalizationfeature-requeston-testplantree-views

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions