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

OCGV: Initial focus should be on the results (ListView) #87

Closed
tig opened this issue Apr 17, 2020 · 6 comments
Closed

OCGV: Initial focus should be on the results (ListView) #87

tig opened this issue Apr 17, 2020 · 6 comments
Labels
enhancement New feature or request Module-ConsoleGuiTools This issue is about Microsoft.PowerShell.ConsoleGuiTools

Comments

@tig
Copy link
Collaborator

tig commented Apr 17, 2020

I have rarely had a need to use the filter functionality. Could just be my use-cases.

But I suspect the predominant use of out-gridview and out-consolegridview will be for quick & dirty "show me a smallish list and let me select something", not "show me a giant list and let me filter so I can select something".

Could be wrong.

But if I'm not, I think ListView should be the item that gets focus when ocgv starts. If users want to then filter they can hit shift-tab, shift-tab to go back to it.

Or...

Make Filter an option (-ShowFilter) that is OFF by default.

@dragonwolf83
Copy link

Disagree strongly about turning Filtering off by default.

My primary use case of Out-GridView is filtering and sorting, then selecting. I often output large results from log files, directories, or data files which often is too much to mess with scrolling in the Console. I run Out-GridView to make sense of it and filter as I go. It is a core experience that I suspect is heavily used.

The default focus on Out-GridView looks to be the grid so setting focus on the ListView would maintain the behavior.

@iSazonov
Copy link

I expect the filter is on by default. This does not force me to use it.

@tig
Copy link
Collaborator Author

tig commented Apr 19, 2020

The Out-GridView implementation focuses on the listbox by default, which is one of the reasons I raised this Issue. I think they should behave the same.

Do we have any data on the % of users who use ocgv for filtering vs. just selecting things?

@TylerLeonhardt TylerLeonhardt added enhancement New feature or request Module-ConsoleGuiTools This issue is about Microsoft.PowerShell.ConsoleGuiTools labels Apr 19, 2020
@TylerLeonhardt
Copy link
Member

We want to keep filter on because:

  • it doesn't take up too much space
  • it's useful to be a single click away

The default focus on Out-GridView looks to be the grid so setting focus on the ListView would maintain the behavior.

If this is the case, I'm for making the change to make the list view have focus over the filter.

@tig
Copy link
Collaborator Author

tig commented Apr 20, 2020

I was running the old ogv when I noted the focus is on the listbox by default.

In the Powershell/GraphicalTools version that is incorrect; the focus, by default, is not set at all. You have to hit tab to get it to focus on the Quick Search box.

So:

  1. The original ogv had focus on the results by default.
  2. The new ogv doesn't set focus at all.
  3. ocgv currently sets focus on the filter box by default.

If it were up to me I'd go with @TylerLeonhardt's comment above and make the list view have focus over the filter.

I agree the Filter should always be there.

(Tons of other inconsistencies noted between the two, I'll file them separately...)

@tig tig changed the title Filter TextView should not be focused by default; ListView should OCGV: Initial focus should be on the results (ListView) Apr 20, 2020
@tig
Copy link
Collaborator Author

tig commented Aug 24, 2022

Fixed in #165

@tig tig closed this as completed Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Module-ConsoleGuiTools This issue is about Microsoft.PowerShell.ConsoleGuiTools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants