-
Notifications
You must be signed in to change notification settings - Fork 64
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
Exiting Output-ConsoleGridView GUI is too hard #61
Comments
It's because I copied from an example 😅I'm not apposed to a single click button or single keyboard shortcut at all. |
Escape would be great to escape and then perhaps a double enter to make a selection? Or let's see how suse does it. Accept down at the lower right similar to GUI with no confirmation. |
I think the default should be just like how |
Yeah. Imma gonna look into doing it... Hold my beer. |
The way I would expect it to work would be: |
Here's what I have working. I like it; seems very natural:
|
Boooooom so fast! Rad |
ESC is tough because it's typically used to close out of menus and whatnot. My ideal option would be:
These would be buttons you could click or use a keybinding to trigger that way we have both mouse and keyboard scenarios handled. I would prefer that keybindings be at least 2 keys or a function key that way you can be absolutely sure you mean what you type. Keep in mind, I'm doing some refactor work in #74 so we should hold off on implementations until that's done. |
A good first step to shave off some keyboard strokes is to keep the menu we already have and just delete the This would mean it would be:
|
Honestly, @TylerLeonhardt what's your objection to using the same keybindings as |
On Windows the keybinding to exit
On Mac and Windows, On Mac and Windows, Are there very many other Powershell cmdlets that are doing I choose ESC/ENTER because it matches what happens with other modal dialogs and is simple for the thing that
The menu is required only for mouse usage. There it shouldn't be a menu, but just 'buttons' like a modal dialog as @TylerLeonhardt suggesed with:
|
Yeah ok that sounds good. The refactor work is done for now so feel free to send a new PR! I'd say the PR should either:
|
The only problem I have with that proposal is that the |
I don't think #79 will be a problem. I now have things working with your new code, however it depends on the new But version
PS> gci | Out-ConsoleGridView -PassThru gci | Out-ConsoleGridView Implementing Side note: In the above, I've disabled your filter code because it's exposing a bug in |
FWIW, I found where the bug in Looks nice! Workaround is this: // Workaround for https://github.com/migueldeicaza/gui.cs/issues/356
filterFieldWidth += 2;
var filterApplyButton = new Button(APPLY_LABEL)
{
// Pos.Right(filterField) returns 0
X = Pos.Right(filterLabel) + filterFieldWidth,
Y = Pos.Top(filterLabel),
Clicked = () =>
{
filterChanged.Invoke(null, filterField.Text);
}
}; |
looks a lot nicer in Windows Terminal too! |
Are Accept and Close clickable? |
My only concern is that Space to select is not very discoverable. |
Not yet as |
Seems like we should wait until We can keep the top menu for now - but support the keybindings you've suggested. This is awesome work @tig. I'm a big fan! |
This is fixed now pending a new release |
To exit the user has to press F9 then accept the confirmation.
Is there a reason this was made so multi-step?
Why not just have a keyboard shortcut (like ESC)?
The text was updated successfully, but these errors were encountered: