Closed MrFly72 closed 1 year ago
This is caused by https://github.com/PowerShell/GraphicalTools/pull/163
I agree this is a change in behavior and it's a bummer it impacted you.
I think it's too late to revert/fix this for 0.7.2 as @andschwa notes.
We can definitely fix for 0.7.3.
The question is, how do I fix it?
See #121 for more background.
I want to describe my impact on this a little bit more in detail. I am using OCGV on a Raspberry Pi for a script I wrote to automate Media Download from State TV. Basically it filters series etc. by rest-api from a source-page, then displays them with OCGV to check for shows to be downloaded. To easier check them, as it is usually a list of 1800 shows, I filter them, eg. "Show 1", then check the ones to download, then filter by "show 2" and mark others to download and so on. at the end, i press enter to accept all shows and then the script will add download jobs on my NAS by rest-api. it will wait for all shows to download and rename them by defined pattern (eg. Date-Series.Title-Episode-Title.mp4). I know, that the Windows Version of OGV, also does not "keep" marked entries by "CTRL", but on the other end there are no checkboxes, so totally different approach.
For me it would be valuable, for the checkmarks to be persistent through filters. At the moment, the workaround for me is, to remove the filter before "enter", as the checkmarks will persist. The only bummer is, that you really have to clear filter by "backspace" character by character
The only bummer is, that you really have to clear filter by "backspace" character by character
The Filter
has a ContextMenu
with a Delete All
where you can delete all text at once.
How do I reach the context menu on Linux shell? Did not find any possibility in an ssh shell
How do I reach the context menu on Linux shell? Did not find any possibility in an ssh shell
By mouse right clicking on the TextField
or by pressing Ctrl+Shift+D. But I see that this isn't working on the current build. I submitted this pr https://github.com/gui-cs/Terminal.Gui/pull/1968 to allow pressing Ctrl+R, because Linux don't differentiate Ctrl+alfa from Ctrl+Shift+alfa.
Mouse? Hehe. Don't use one on my iPad which connects via SSH to the raspian shell and then use the shell to start pwsh. So keyboard is essential for this.
Mouse? Hehe. Don't use one on my iPad which connects via SSH to the raspian shell and then use the shell to start pwsh. So keyboard is essential for this.
I forgot to mention that the context menu can be opened with the keyboard by pressing Shift+F10
, but I don't know why it isn't opening with the current build.
Ok. I mean I can understand that some people want it this way (Filter will forget all previously checked). As in the thread which changed this was mentioned, there are people who want his behavior and some don't. This is a typical area for a switch. Default could be "drop selections" and a switch like -keepselectsonfilter could keep them.
I must realize, that I more then once walked into this issue, even after knowing that it changed. HAd this great way before:
Would a solution be to 'pin' selected items regardless of filter? So if an item is checked then it doesn't disappear even when the filter is changed? That should make clear that the ticked items are going to be confirmed even if they don't match the filter?
Sort of like this: Ignore the random reorder of items as they are ticked ;)
Apologies if I have misunderstood the issue.
Would also be ok in my eyes. And I think the counter of how many are selected is also not a bad idea.
That is the best solution. Maintaining a track on each new filter to the ID of all the available items from the empty filter.
Is someone actively working on this? I must really admit that I really often "pitfall" into this. Filter, check some element, filter something else, check some additional and then forget to delete filters and will only have the elements with the checked ones in the second filter. Btw. I use this in a list with about 2000items, where without filtering, it is not really nice to select. A solution would be very welcome!
I def want to fix this!
I will get to it asap.
Any news? Meanwhile i get used to
No update at this time. On my list to work on but been super busy. Sorry.
Any news on this?
@MrFly72, whatcha think of this?
The model is now:
Thanks to @tznind for the suggestion.
Looks great. Can tell you how it feels when able to try.
Putting @MrFly72's question in right thread:
One first question. How does it behave if the screen eg. Only shows 20 elements and I have already selected 18. is the scrolling area then still 20 and the pinned elements will "walk up" in the list or are place 1-18 fix with the pinned elements and only the lines 19-20 will move?
The pinned elements currently are just the top elements in the filtered list. They scroll with the list.
Making them actually be pinned (so they don't scroll) would be a big change...
Hi. I am testing in every day usage and found out, that the elements will not be on top of list, they will be in the same order, that they would have been in the "no-filtered" list: Would be "nicer" if they would really be at the top. Or what do you think ?
That was my intent. I'll look to see what I did wrong.
It is a large objectlist I am using (2600 rows).Don't know if that matters. It takes a while to load (about 10 secs) from pipeline.
Prerequisites
Steps to reproduce
When a filter is active at the end of choosing elements, only the elements that are included in the active filter will be returned. eg.: Get-Process | Out-ConsoleGridView Check one process, eg. Word Filter by eg.Notepad, check Notepad When you now hit enter with the active filter for notepad, only notepad will be returned
There is only one workaround this, you have to remove the filter before hitting enter.
This bug is introduced in the newer version, as before, hitting enter in a filtered list, would gather all elements that have been checked.
Expected behavior
Actual behavior
Error details
Environment data
Version
0.7.2
Visuals
No response