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

Preview what actions will be run in commandline mode of the CmdPal #8344

Closed
zadjii-msft opened this issue Nov 20, 2020 · 9 comments · Fixed by #8515
Closed

Preview what actions will be run in commandline mode of the CmdPal #8344

zadjii-msft opened this issue Nov 20, 2020 · 9 comments · Fixed by #8515
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.

Comments

@zadjii-msft
Copy link
Member

So we've already got an open work item tracking "display the parse error (if any) in commandline mode", #7284. What if, when we determine that the commandline is valid, we then display what commands are about to be executed, instead of the parse error?

So if you type in

nt ssh user@server.com

We'll parse that, and that won't generate an error message, it'll instead successfully turn into a newTab(commandline="ssh user@server.com") action. We'll then take that action, and call GenerateName on it, and we'll get "Open a new tab, commandline: ssh user@server.com". We'll then display that text to the user, as a preview of what they're about to run.

@zadjii-msft zadjii-msft added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. labels Nov 20, 2020
@ghost ghost added the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Nov 20, 2020
@Don-Vito
Copy link
Contributor

@zadjii-msft - we need to consider the UX as I already put the history into the palette..

@zadjii-msft
Copy link
Member Author

Yea, I've been thinking about that. The history is definitely better - but is there a sensible way of having both these things?

This is my terrible mockup:
image

(too lazy to bold results in the mockup)

So in this case, the user is typing a command, and they could select the nt -p Ubuntu ; ... command from the history, but until they do, we'd display the error (or results) after a short delay. I'm not sure how that really feels.

Or I guess when it's successful:
image

@Don-Vito
Copy link
Contributor

Don-Vito commented Nov 20, 2020

@zadjii-msft - some off-topics

  1. how do you create the mockups - this is really cool!
  2. There is another aspect that I was thinking of is prediction from history.

Here how it goes:

  1. You start typing
  2. Then you go down to the history
  3. Once you navigate through the items there, the text in the search box receives a relevant suffix in a weaker font
  4. If you press tab key it makes the suffix to be a part of the search box

So you can:

  1. Write nt
  2. Go to nt -p Ubuntu; sp --tabColor #ff00ff
  3. Press tab
  4. Continue typing "; sp" to get nt -p Ubuntu; sp --tabColor #ff00ff ; sp

@zadjii-msft
Copy link
Member Author

It's an app called XAML Studio, which is an absolute lifesaver.

I certainly like the "tab complete" functionality you've suggested here. I dunno how hard it'd be to actually implement, I'm not sure how hard it would be to have multiple styles of text in a single text box. Maybe there's another type of control that would allow for it, but my XAML-fu is not that strong.

@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Nov 20, 2020
@Don-Vito
Copy link
Contributor

It's an app called XAML Studio, which is an absolute lifesaver.

I certainly like the "tab complete" functionality you've suggested here. I dunno how hard it'd be to actually implement, I'm not sure how hard it would be to have multiple styles of text in a single text box. Maybe there's another type of control that would allow for it, but my XAML-fu is not that strong.

Thanks! I will try to use it!
I guess we will need to overlay some transparent label or something like this.

@DHowett DHowett removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Nov 24, 2020
@Don-Vito
Copy link
Contributor

Don-Vito commented Dec 7, 2020

Hey. I played for an hour with this. I will open a PR for some initial step 😊

@zadjii-msft
Copy link
Member Author

Y A Y

@ghost ghost added the In-PR This issue has a related PR label Dec 7, 2020
@Don-Vito
Copy link
Contributor

Don-Vito commented Dec 7, 2020

CmdPalPrediction

@ghost ghost closed this as completed in #8515 Dec 16, 2020
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Dec 16, 2020
ghost pushed a commit that referenced this issue Dec 16, 2020
This commit introduces another optional text block in palette that will
be shown in the command line mode (above the history). This text block
will either contain a list of parsed command lines or a description why
the parsing failed

Closes #8344
Closes #7284
@ghost
Copy link

ghost commented Jan 28, 2021

🎉This issue was addressed in #8515, which has now been successfully released as Windows Terminal Preview v1.6.10272.0.:tada:

Handy links:

mpela81 pushed a commit to mpela81/terminal that referenced this issue Jan 28, 2021
This commit introduces another optional text block in palette that will
be shown in the command line mode (above the history). This text block
will either contain a list of parsed command lines or a description why
the parsing failed

Closes microsoft#8344
Closes microsoft#7284
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants