-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Add size
param to splitPane
action, split-pane
subcommand
#8543
Conversation
…, you say, 'Let's add some tests,' they say, 'Heck no, I don't like no tests'?
@@ -147,7 +148,8 @@ namespace SettingsModelLocalTests | |||
{ "name": "command1", "command": { "action": "splitPane", "split": "vertical" } }, | |||
{ "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" } }, |
There was a problem hiding this comment.
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?
Hello @zadjii-msft! Because this pull request has the 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 (
|
## 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
🎉 Handy links: |
…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
## 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
Summary of the Pull Request
Adds a
size
parameter tosplitPane
. This takes afloat
, 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
wt ; sp -s .25
wt ; sp -s .8
wt ; sp -s .8 ; sp -H -s .3
PR Checklist
wt.exe
should support-%,--percent
for setting a pane's size on the commandline #6298size
param ofsplitPane
action MicrosoftDocs/terminal#208Detailed Description of the Pull Request / Additional comments
I went with
size
,--size,-s
rather thanpercent
, 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