Skip to content

Add size param to splitPane action, split-pane subcommand#8543

Merged
8 commits merged intomainfrom
dev/migrie/f/split-percentage
Dec 18, 2020
Merged

Add size param to splitPane action, split-pane subcommand#8543
8 commits merged intomainfrom
dev/migrie/f/split-percentage

Conversation

@zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Dec 10, 2020

Summary of the Pull Request

Adds a size parameter to splitPane. This takes a float, and specifies the portion of the parent pane that should be used to create the new one.

This also adds the param to the split-pane subcommand.

Examples

commandline result
wt ; sp -s .25 image
wt ; sp -s .8 image
wt ; sp -s .8 ; sp -H -s .3 image

PR Checklist

Detailed Description of the Pull Request / Additional comments

I went with size, --size,-s rather than percent, because the arg is the (0,1) version of the size, not the (0%,100%) version.

Validation Steps Performed

Added actions, played with the commandline, ran tests

@ghost ghost added Area-Commandline wt.exe's commandline arguments Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. labels Dec 10, 2020
zadjii-msft added a commit to MicrosoftDocs/terminal that referenced this pull request Dec 15, 2020
@zadjii-msft zadjii-msft self-assigned this Dec 15, 2020
@zadjii-msft zadjii-msft removed their assignment Dec 17, 2020
@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Dec 17, 2020
{ "name": "command2", "command": { "action": "splitPane", "split": "horizontal" } },
{ "name": "command4", "command": { "action": "splitPane" } },
{ "name": "command5", "command": { "action": "splitPane", "split": "auto" } }
{ "name": "command5", "command": { "action": "splitPane", "split": "auto" } },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: maybe add a test for "split" and "size" both defined?

@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Dec 18, 2020
@ghost
Copy link

ghost commented Dec 18, 2020

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 4f46129 into main Dec 18, 2020
@ghost ghost deleted the dev/migrie/f/split-percentage branch December 18, 2020 03:52
ghost pushed a commit that referenced this pull request Jan 12, 2021
## Summary of the Pull Request

I forgot to reset the `--size` argument to `split-pane` when I added it. This PR fixes that, and adds a test so I don't regress it again.

## References
* Missed in #8543


## PR Checklist
* [x] I work here
* [x] Tests added/passed
@ghost
Copy link

ghost commented Jan 28, 2021

🎉Windows Terminal Preview v1.6.10272.0 has been released which incorporates this pull request.:tada:

Handy links:

mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
…osoft#8543)

## Summary of the Pull Request

Adds a `size` parameter to `splitPane`. This takes a `float`, and specifies the portion of the parent pane that should be used to create the new one. 

This also adds the param to the `split-pane` subcommand.

### Examples
 
| commandline | result |
| -- | -- |
| `wt ; sp -s .25` | ![image](https://user-images.githubusercontent.com/18356694/101784317-fb595680-3ac0-11eb-8248-782dc61957cf.png) | 
| `wt ; sp -s .8` | ![image](https://user-images.githubusercontent.com/18356694/101784442-20e66000-3ac1-11eb-8f9b-fb45a73c9334.png) |
| `wt ; sp -s .8 ; sp -H -s .3` | ![image](https://user-images.githubusercontent.com/18356694/101784552-470c0000-3ac1-11eb-9deb-df37aaa36f01.png) |

## PR Checklist
* [x] Closes microsoft#6298
* [x] I work here
* [x] Tests added/passed
* [x] Docs PR: MicrosoftDocs/terminal#208

## Detailed Description of the Pull Request / Additional comments

I went with `size`, `--size,-s` rather than `percent`, because the arg is the (0,1) version of the size, not the (0%,100%) version. 

## Validation Steps Performed

Added actions, played with the commandline, ran tests
mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
## Summary of the Pull Request

I forgot to reset the `--size` argument to `split-pane` when I added it. This PR fixes that, and adds a test so I don't regress it again.

## References
* Missed in microsoft#8543


## PR Checklist
* [x] I work here
* [x] Tests added/passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Commandline wt.exe's commandline arguments AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Second It's a PR that needs another sign-off Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wt.exe should support -%,--percent for setting a pane's size on the commandline

3 participants