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

Add a splitPane option to duplicate current profile #4683

Merged
9 commits merged into from
Mar 6, 2020

Conversation

surya-prakash-susarla
Copy link
Contributor

@surya-prakash-susarla surya-prakash-susarla commented Feb 21, 2020

This change adds the ability to configure a pane to split by duplicating the current profile

Closes #1756

Surya Prakash Susarla and others added 2 commits February 22, 2020 00:00
Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

I'd really love if we could add some tests for scenarios using this setting as well :)

Overall I'm pretty happy with this. I think with the few pieces you're missing, this will be easy to sign off on

src/cascadia/TerminalApp/ActionArgs.h Show resolved Hide resolved
src/cascadia/TerminalApp/TerminalPage.cpp Show resolved Hide resolved
src/cascadia/TerminalApp/TerminalPage.cpp Show resolved Hide resolved
@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 21, 2020
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 23, 2020
@zadjii-msft
Copy link
Member

@msftbot make sure @DHowett-MSFT signs off on this

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Feb 24, 2020
@ghost
Copy link

ghost commented Feb 24, 2020

Hello @zadjii-msft!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I'll only merge this pull request if it's approved by @DHowett-MSFT

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

This looks good to me. Thanks!

@surya-prakash-susarla surya-prakash-susarla marked this pull request as ready for review February 25, 2020 03:38
@zadjii-msft zadjii-msft added Area-Settings Issues related to settings and customizability, for console or terminal Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. labels Feb 25, 2020
@surya-prakash-susarla
Copy link
Contributor Author

@zadjii-msft Hey, sorry to disturb again but I'm still not able to deploy it to test my changes. The 'bcz' command gives me a couple of warnings but says that the build succeeded. When I try to deploy the solution though I run into different kinds of errors. Can you please help me out on testing this.
[The below error came up when I used deploy solution in VS]
image
[The same error comes up when I press f5 directly to debug too]
image

@zadjii-msft
Copy link
Member

@Surya-06 I've frankly never seen that error before D: I'm not sure how that'd even happen... Does E:\terminal\scr\cascadia\TerminalControl\Generated Files\SearchBoxControl.xaml actually exist?

Maybe try just building the solution directly from VS, then running it there? There's pretty minor differences between how VS builds the solution and how plain-old MsBuild (which bcz calls) builds it. That's my only theory at the moment.

I'll pull your branch locally to test myself and make sure.

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

Okay, checked this out and built this locally. The suggestion I've made is needed to prevent a runtime exception. Without this line, it's possible that realGuid is never initialized. Fix that, and you'll be good to go.

src/cascadia/TerminalApp/TerminalPage.cpp Show resolved Hide resolved
@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Feb 28, 2020
Change for exception as suggested.

Co-Authored-By: Mike Griese <[email protected]>
@ghost ghost removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something AutoMerge Marked for automatic merge by the bot when requirements are met labels Mar 2, 2020
@surya-prakash-susarla
Copy link
Contributor Author

@zadjii-msft I have committed your suggestion to handle the exception you pointed out. Let me know if I've missed anything.

@zadjii-msft zadjii-msft added the Needs-Second It's a PR that needs another sign-off label Mar 2, 2020
@ghost ghost requested review from miniksa, carlos-zamora and leonMSFT March 2, 2020 15:37
@surya-prakash-susarla
Copy link
Contributor Author

@zadjii-msft Hey, I've finally been able to deploy and run the terminal. Is the key that I created enough to create a keyboard shortcut? If not is there a guide on how to create the shortcuts.

@zadjii-msft
Copy link
Member

@Surya-06 yep, it works just fine for me :)

@surya-prakash-susarla
Copy link
Contributor Author

@Surya-06 yep, it works just fine for me :)

can you tell me how you added the keyboard shortcut. i tried action as splitPane with splitMode as arg, i tried the value as 0/1 and also "duplicate" but couldn't see the result.

@zadjii-msft
Copy link
Member

No problem, I just threw it on:

        { "command": { "action": "splitPane", "split":"auto", "splitMode": "duplicate" }, "keys": [ "ctrl+alt+t" ] },

@surya-prakash-susarla
Copy link
Contributor Author

@zadjii-msft Finally everything fell into place on my machine and I could use my changes. Thanks for all the help. Hope to contribute more!!! 😃
PS: For anyone facing build errors, this video is super awesome. https://www.youtube.com/watch?v=4N1Ils4cDYo

@surya-prakash-susarla
Copy link
Contributor Author

@DHowett @carlos-zamora @miniksa @leonMSFT Can any of you please take a look at this, it's been a week since the last review. Thanks !

@miniksa
Copy link
Member

miniksa commented Mar 6, 2020

Yeah, sure. Though I'm not sure why @zadjii-msft requested @DHowett-MSFT for sign-off. I'll confer with him about it.

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

OK, I approve. It looks good. But @zadjii-msft said that he and @DHowett-MSFT had a verbal discussion about this, so I want to prod @DHowett-MSFT to be final check before it merges. I'll bother him today.

@miniksa
Copy link
Member

miniksa commented Mar 6, 2020

@msftbot make sure @DHowett-MSFT signs off on this

@ghost ghost added the AutoMerge Marked for automatic merge by the bot when requirements are met label Mar 6, 2020
@ghost
Copy link

ghost commented Mar 6, 2020

Hello @miniksa!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I'll only merge this pull request if it's approved by @DHowett-MSFT

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

@surya-prakash-susarla
Copy link
Contributor Author

@miniksa Thanks for the quick reply. Do let me know if something needs to be done.

@DHowett-MSFT
Copy link
Contributor

If your branch has maintainer access turned on, I'm going to push a commit that fixes the line endings making it difficult to review/making everything conflict w/ ActionAndArgs

Copy link
Contributor

@DHowett-MSFT DHowett-MSFT left a comment

Choose a reason for hiding this comment

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

This looks great to me. Thanks!

@DHowett-MSFT DHowett-MSFT changed the title Split pane option to duplicate current profile Add a splitPane option to duplicate current profile Mar 6, 2020
@DHowett-MSFT
Copy link
Contributor

(Sorry we sat on a relatively well-contained change for two weeks!)

@ghost ghost merged commit cc35c83 into microsoft:master Mar 6, 2020
@surya-prakash-susarla
Copy link
Contributor Author

(Sorry we sat on a relatively well-contained change for two weeks!)

Thanks for responding so quick @DHowett-MSFT .

@say25
Copy link

say25 commented Mar 17, 2020

Saw this in the release notes, but I can't seem to configure it in the profiles.json

@DHowett-MSFT
Copy link
Contributor

@say25 okay we can only help you if you share with us what you've tried

@azchohfi
Copy link

You need to update to the latest version (0.10.761.0), then it works. Still, the schema is not giving me the splitMode property, on VSCode, but it works anyway. This is what I'm using:

{ "command": { "action": "splitPane", "split": "horizontal", "splitMode": "duplicate"}, "keys": "alt+shift+-" },
{ "command": { "action": "splitPane", "split": "vertical", "splitMode": "duplicate"}, "keys": "alt+shift+plus" },

@say25
Copy link

say25 commented Mar 17, 2020

Yea its more that it doesn't show in the schema but im trying:

    "keybindings": [
        {
            "command": {
                "action": "splitPane",
                "split": "horizontal",
                "splitMode": "manual"
            },
            "keys": [
                "ctrl+_"
            ]
        }, 
        .....

@DHowett-MSFT
Copy link
Contributor

So, you almost certainly want the duplicate splitMode, not the manual one. The schema hasn't been updated yet (sorry about that!)

@say25
Copy link

say25 commented Mar 17, 2020

Well I actually kinda have an "odd use case" basically I'll be at one directory and/or have some amount of env. variables set in the shell (AWS/Azure creds) and then I need to switch from bash to powershell or vice versa. Maybe this feature doesnt entirely address that but it looked like it might

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-Settings Issues related to settings and customizability, for console or terminal Area-UserInterface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met 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.

Allow the user's "open pane" bindings to open a pane with the current pane
7 participants