psifidotos / workflow-project

This is an effort to create a KDE Plasmoid that integrates the main Activities, Virtual Desktops and Tasks Functionalities from Plasma Desktop in just one component.
http://workflow.opentoolsandspace.org/
GNU General Public License v2.0
11 stars 2 forks source link

Search/Filter input field #64

Closed bmihaila closed 11 years ago

bmihaila commented 11 years ago

Hi

This is more like an idea for the future. I was thinking the plasmoid could have an input field maybe at the top that will be used as a filter for the displayed window names. If you input there a string only the windows containing that string in their title/name will be shown. This would make it easy to search for a window or open application on all your workareas. Not only it happens that one forgets where an application is open but also with the current way windows are shown only the first n characters of the title are visible because of the small desktop rectangle. So if one has various windows from the same application (e.g. browser, editor, console ...) and is looking for one with a certain title then this would make things much easier than clicking through all of them to see which is the right one.

bmihaila commented 11 years ago

Btw there is a small plasmoid that implemented the search through all windows in all activities and desktops: http://kde-apps.org/content/show.php/WindowList+QML?content=156455 and it is written in QML so it might be possible to use some code from there.

psifidotos commented 11 years ago

this is not difficult but the design decisions behind it are a bit tough: the way it is done is through QSortFilterProxyModel which has already been used when someone wants to show windows for specific workarea (in the Desktop Dialog). When I tried to use the same for workareas the perfomance was acceptable but there were issues with the windows shown. Probably because there were too many QSortFilterProxyModels. If this is something very important then the following things will happen...

->The animations that show an activity to go from running to stopped and vice versa must be dropped.. ->The animations of the dragged window going into the workarea must also be dropped. The above I dont think are very important actually. Activities should also use QSortFilterProxyModel (this is not a big deal and can be easily created but it must be taken into account the new ordering system, there is a chance that perfomance will drop a lot because of this - except if we trigger soring filtering explicitly and not automatically), with the current structure Activities that are stopped are just hidden in the workareas list....

psifidotos commented 11 years ago

Well some news here... I made some tests with sortfiltering and almost all of the above do not exist... :) Actually sortfiltering with activities makes lighter the whole experience... Try zoom in and out you would not believe in the result ( it is smooth.... :) ). Because of the gains I made them immediately available... I will also provide soon fltering support for tasks without the above issues.. :) I love open source but not only, I like open discussions and design also,... :) So, do not be suprised if this feature is ready before the previous release....

bmihaila commented 11 years ago

Wow, you code so fast that I cannot keep up with reinstalling ;). Nice to hear that it is not a problem. Looking forward to it then.

bmihaila commented 11 years ago

Hi

Don't know if I am missing something but I cannot find the search input field. So how to get it and where to type the search/filter expression?

psifidotos commented 11 years ago

Óôéò 04/02/2013 03:08 ìì, ï/ç Bogdan Mihaila Ýãñáøå:

Hi

Don't know if I am missing something but I cannot find the search input field. So how to get it and where to type the search/filter expression?


Reply to this email directly or view it on GitHub https://github.com/psifidotos/workflow-project/issues/64#issuecomment-13076026.

Just press the character / (like in firefox, with double // the element gains focus also)

bmihaila commented 11 years ago

Hi again

Ok, it works like you said but I would have some suggestions.

I also stumbled into a bug where typing a filter string and deleting the string either through backspace or ctrl-backspace does not make all the windows appear again. It mostly happens with the windows in the last desktop of the last visible activity. Unfortunately I did not find exactly out what causes it sometimes it happens and sometimes not. Seems to depend on the filter string I write but not sure. Can only tell that I need to input a string that is in none of the windows thus hides everything and press enter to get the window appear again in the plasmoid. Will try to find out more, but might be a bug with the filtering model.

psifidotos commented 11 years ago

about the suggestions, single / and Ctrl+F were accepted... always shown it creates clutter that I dont like... about the situation with the bug you can try the new version in order to see if it has changed its behavior. all changes in development branch....

bmihaila commented 11 years ago

Hi again

always shown it creates clutter that I dont like...

Not sure I agree but I am fine with it as many programs have the search bar appear only when needed and then again you are the designer ;) and it looks good how it slides in anyway. So thanks for implementing it. Just hope it will not go unnoticed by the users as it is a great feature and at the moment somehow hidden. Unfortunately the bug mentioned above is still there and seems to make windows disappear randomly but not of big concern at the moment and I will try to add some debug code to pinpoint where exactly the bug lies.

I also like the new hiding background feature as it makes the plasmoid integrate much better into the rest of plasma.

psifidotos commented 11 years ago

bmihaila, in branch devsearchfilter I have changed a bit the behavior for testing purposes. The filtering is only activated with Enter and not while the user writes. Can you make a test with this in order to see if problem remains?

psifidotos commented 11 years ago

Something tells me that the new fixes in appearance when filtering windows in development branch, you are going to like them.... :)

bmihaila commented 11 years ago

Hi

I tried the devsearchfilter branch and it does not fix the issues. Also I liked the instant filter much more ;) than having to press enter each time. Was about to investigate the issue and why some windows are hidden. Will let you know more after the bug hunting session. Will now also have to try your new devel branch to see the new appearance. Btw the fonts fixes are also quite nice, things now again look more intergrated.

bmihaila commented 11 years ago

Ohh, nice thing with shading the workareas without search hits. That is exactly what I was envisioning when asking for the feature. Great improvement! Keep going!

bmihaila commented 11 years ago

Hei again. I tried to hunt down the bug mentioned above that sometimes when deleting the filter string not all windows appear again in the Workareas map. I played around with the WorkAreaDeleg and WorkAreaTaskDeleg and looked into the filterproxy code and inserted debug output here and there but could not really get to any good conclusion. The thing is that the windows seem to be in the model and are even shown in the preview popup but the workarea view rectangles (the windows list) seem to not be redrawn to show some of the windows, so they seem empty. Even the little number in the left corner shows the windows! See the snapshot below: dektop-snapshot

Not any drag&drop of windows or hiding the plasmoid does bring the windows back only reordering of the activities solves it. Any ideas why the list view of the windows is sometimes not updated correctly when clearing the filter string?

First I was thinking that it only occurs for me but then while watching the video you made I noticed it happens also on your system ;). When you type the filter string and then delete it again some of the windows are not shown again. Happens around minute 1:26 just look at your Workareas called "Local, Desktop 2, Open Source" there are numbers for windows but no windows shown: dektop-snapshot1

psifidotos commented 11 years ago

Hei again. I tried to hunt down the bug mentioned above that sometimes when deleting the filter string not all windows appear again in the Workareas map. I played around with the WorkAreaDeleg and WorkAreaTaskDeleg and looked into the filterproxy code and inserted debug output here and there but could not really get to any good conclusion. The thing is that the windows seem to be in the model and are even shown in the preview popup but the workarea view rectangles (the windows list) seem to not be redrawn to show some of the windows, so they seem empty. Even the little number in the left corner shows the windows! Not any drag&drop of windows or hiding the plasmoid does bring the windows back only reordering of the activities solves it. Any ideas why the list view of the windows is sometimes not updated correctly when clearing the filter string?

First I was thinking that it only occurs for me but then while watching the video you made I noticed it happens also on your system ;). When you type the filter string and then delete it again some of the windows are not shown again. Happens around minute 1:26 just look at your Workareas called "Local, Desktop 2, Open Source" there are numbers for windows but no windows shown.

I know, I noticed it a few days ago... I dont think is going to be easy to find out what's happening in order to create in the end a fix or a workaround. I think that has something to do with asychronous signaling in showing the delegates in the listview... We'll see....

psifidotos commented 11 years ago

Can you test please filterbug ? There is a temporary workaround for not showing some windows when filtered... The worst case was than when the user cleared the filter text some windows did not appear... I think with this patch that is fixed....

bmihaila commented 11 years ago

Ok, it seems to not appear anymore from my testings. Will report later if the bug reappears but for now workaround seems to work. thx :)