heqro / stupid-simple-launcher

Simple launcher for your applications as well as session management, search and favorite applications support. Powered by KDE.
14 stars 1 forks source link

Support for touchscreen. #4

Closed Tuxman2 closed 2 years ago

Tuxman2 commented 2 years ago

As I said in another topic, I've got a 2-in-1 laptop with touchscreen. Previously, I used 'Launchpad Plasma' menu and when I wanted to see all applications, I used my finger on the screen to scroll all icons (as we can do on a tablet or smartphone). On 'Launchpad plasma' it worked well, but with 'Stupid-simple-launcher' it is not very good. Perhaps it is something that you can have a look.

Thanks.

Note: I will check with the categories to see if the scrolling with finger works well.

News: The scrolling for the categories with the finger works well. ;-)

heqro commented 2 years ago

Thank you for the careful write-up. I'll be sure to head back to this topic in a while. Given that the categories sidebar works and so does launchpad plasma, it should be an easy fix.

I may demand a bit of patience though - I've got my finals at January so I want to make sure I pass! :-)

Tuxman2 commented 2 years ago

No problem. Good luck for your exams. ;-)

Tuxman2 commented 2 years ago

Hi heqro,

I see your are come back. ;-) I guess your exams are finished ?

I come back with this post. I tested the last version of launchpad plasma menu. With this menu, the scrolling is horizontal and not vertical for the grid. I don't know if I can post a little video here to show you how it works. It works well with the mouse or the finger when I want to show the other icons not displayed.

Regards.

heqro commented 2 years ago

Hello again,

Yes, my exams are done now.

With relation to your comment, I could gather as much while I was essentially trying to make the interface work better under Wayland: turns out there is a massive bug in some scrollbars used by other menus (like Zren's tilled menu or the official KDE fullscreen application launcher) that would make the entire list "jump" to the top when you scrolled to the end with a touchpad.

Now, I fixed it by resorting to use the "stock" QML scrollbar. I'm not too certain if this will fix this particular issue - fingers crossed QML thought about supporting touchscreens.

I want to assure I've been (tangentially) working on it by having a look at everything else around the menu. The reason why I have yet to update the menu on Pling is because I am reimplementing some functionality I purposely wrecked to allow me to better solve other simpler problems.

Should just take a day or two to get it working. Also performance improvements are coming.

heqro commented 2 years ago

Hey, it's me again. You might want to try this beta version of the menu, just to see whether or not your touchscreen behaves properly under it. I am using stock scrollbars, I don't really know if it will work at all because I don't have a touchscreen in my laptop.

You may notice some other things appear slightly different - I've been working quite a bit on this so I won't know the actual extent of the changes up until I sit down to write them all in a changelog prior to uploading to the KDE Store. Essentially, there should be nothing new bar code refactoring and the categories sidebar not sticking to the apps grid but staying on the (right/left)-most side of your screen instead, which seems to makes more sense.

As for updating, if the menu is installed in your system, you can update it extracting the file I enclose with this message and typing the following command in the folder to upgrade:

kpackagetool5 -t Plasma/Applet --upgrade stupidsimplelauncher

The menu should have been updated by the time you log out and log back into your system.

stupidsimplelauncher_220130_beta.tar.gz

Tuxman2 commented 2 years ago

Thanks.

I will do many tests tomorrow because today I have little time to do them.

Regards.

Tuxman2 commented 2 years ago

Hello,

well, I tested your beta version. The scrolling for the applications grid works (with my touchpad and my touchscreen) but it is not as good as in 'Launchpad plasma' menu. I know it is not easy to do this kind of thing and you made something functional but I suggest to you to test the 'Launchpad Plasma' menu, so that you understand what I mean. A touchscreen is not necessary, you can use the mouse/touchpad (click on an application and move the mouse or the touchpad (left or right)). Of course, the grid must be displayed on two or more part of the screen.

Regards.

heqro commented 2 years ago

A touchscreen is not necessary, you can use the mouse/touchpad (click on an application and move the mouse or the touchpad (left or right)).

I could try as much. I tried using Launchpad Plasma back in the day to not a lot success. Here's the thing: the implementation posed in there works wonders if you happen to be doing exactly what you are telling: clicking on an application and moving the mouse or the touchpad left or right.

Now, in my touchpad, the experience is completely all over the place: I the moment I try using my touchpad to change from page to page, I immediately get launched to the last/first page. I understand this behavior maaaaay be acceptable for touchscreens, but it's precisely the reason why I am not paginating the menu like Launchpad does and using a scrollbar instead.

Moreover, I am planning on eventually adding the functionality currently present on, say, Gnome menu (drag and drop to create folders). This behavior would conflict with the way the menu would work if I were to paginate the menu and make it traversable by drag and dropping just like the other one is.

I can only hope for the day I move to a half-decent 2-in-1 laptop and spend a couple days testing.

Tuxman2 commented 2 years ago

Do you think you can find a way to make the scrolling for the applications grid like we can do on a smartphone/tablet or it is something very complicated to do on your menu without the help of a touchscreen ?

Thanks.

Regards.

heqro commented 2 years ago

Pretty hard to tell. For now, all I tried was getting it all to the point where I felt like it flawlessly worked with my input devices (mainly a touchpad), and the experience is buttery smooth at least in the version I shared with you. I am afraid I won't be able to develop the scrolling like you mean for as long as I don't have a touchscreen. I'll be sure to come back to this issue if/when I have the knowledge to implement it without a touchscreen, or when I am able to use one to develop this menu with.

Tuxman2 commented 2 years ago

Hi heqro,

perhaps the source code of the 'Launchpad plasma' applet can help you to do this kind of thing, no ? Probably the scrolling available for the applications grid in 'Launchpad plasma' can be adapted/modified for the vertical scrolling available in your menu. Of course, It's just my suggestion.

Regards.

heqro commented 2 years ago

Hi,

perhaps the source code of the 'Launchpad plasma' applet can help you to do this kind of thing, no ?

The reason why my menu is a thing is because the implementation of that menu does not work at all under my touchpad. If I swipe, that menu will launch me to the last or first page of the entire list of pages.

If I were to make it like that, it would stop being useful for me. Anyway, it all would be much easier if I had a touchscreen to test and see if I can find a solution that fit both use cases, but so far I haven't found anything.

Also, I first want to get around making folders by dragging elements of the menu around. This is incompatible, at least on first sight, with what launchpad plasma does because it would change the current page in their implementation.

Tuxman2 commented 2 years ago

Ok, I understand. ;-)

Tuxman2 commented 2 years ago

Hello heqro,

I come back to you.

The last days, I thought of one thing. Previously, I told you that the scrolling for the categories with the finger worked well on my touchscreen. So, perhaps, you can adapt that scrolling for the applications grid on your menu ? The best thing would be to have a vertical scrolling for the categories and a horizontal scrolling for the applications grid. Of course, if it is possible. So, can you have a look on these 2 suggestions ?

Thanks.

heqro commented 2 years ago

Hello,

It should be feasible. Knowing scrolling for the categories works on your device is telling, because the "objects" in QML I am using are really simple. Could you please tell me if it feels like scrolling on the applications drawer of, say, an Android device? Does the experience come close to it?

With relation to your idea, I think it's going to the back burner for a while: other commenter tasked me with bugs that involve implementing a back-end for managing hidden applications. I do really want to get my hands into what you propose, but I would really like to launch a revamp of the applications grid adding all the functionality I promised to, which will mean getting around what you propose and trying to solve it without messing up too much as well as other cool functionality like creating folders inside the menu and dragging and dropping outside it to create widgets.

I want to assure I will get around to it, I am just failing to get a sufficient amount of time to dedicate to it. Moreover, I feel like I want to get around polishing the code and fixing broken functionality prior to adding new one. Therefore, if you happen to have any other visual bugs or things just generally not working the way you'd expect to, I'd encourage you to keep adding issues if and only if you have the time for it.

Tuxman2 commented 2 years ago

Hello,

I understand. Your project is starting to grow, and adding new features takes a lot of time.

Regards.

Tuxman2 commented 2 years ago

I do another suggestion for it (see my new issue) ;-)

heqro commented 2 years ago

Hi, I enclose this video about the current state of what I'm doing with regards to this issue. Here I am swiping sideways on Wayland with my touchpad to change the apps page. Please keep in mind some elements of the grid are extremely hard coded in this video so there is some work to be done.

2022-02-28 00-27-46.zip

Edit: there is a page indicator coming as well as soon as I've sorted out how the grid works.

Tuxman2 commented 2 years ago

Wow, it looks good. :-)

I saw a few jerks when swiping grid (on the video). Do you think you will be able to improve this with a smoother swiping ? Otherwise, I eagerly await the final result regarding on this part.

You do good work. Thanks. ;-)

Note: I noticed your are using EndeavourOS. I guess you are now on KDE plasma 5.24.2 with Wayland as EndeavourOS is using the Arch repositories ?

heqro commented 2 years ago

I saw a few jerks when swiping grid (on the video). Do you think you will be able to improve this with a smoother swiping ? Otherwise, I eagerly await the final result regarding on this part.

If the moment you tried swiping the colored rectangles worked just fine, then it will work just fine with the grid. My touchpad would act funny with the colored rectangles as well.

I guess you are now on KDE plasma 5.24.2 with Wayland as EndeavourOS is using the Arch repositories ?

Yes, I am now on Plasma 5.24.2 but I only use Wayland when it comes to testing this feature, because Wayland still is a really bad experience for me.

Tuxman2 commented 2 years ago

If the moment you tried swiping the colored rectangles worked just fine, then it will work just fine with the grid. My touchpad would act funny with the colored rectangles as well.

Ok. When this feature will be functional, I will be ready to test. ;-)

Yes, I am now on Plasma 5.24.2 but I only use Wayland when it comes to testing this feature, because Wayland still is a really bad experience for me.

I'm on Plasma 5.24.4 too (Last Manjaro KDE version). :-)

Tuxman2 commented 2 years ago

hello heqro,

well, I tested the last version from your github here and I want to tell you that now I don't have applications grid anymore. Search bar working, sessions buttons working and categories are displayed. But no application icons are displayed on the screen.

Can you have a look ?

Thanks.

Note: I installed your plasmoid manually.

heqro commented 2 years ago

Well, I actually didn't think about the fact that people could actually just download the menu from GitHub and essentially update the menu or install it that way.

It's on me; I have been breaking things up on purpose just to make room for both the "paginated" version of the menu and the scrollable version of it as well. Thus for now I would advise you just to roll back to either the pling version of the menu or just the one I sent you before via some other GitHub issue.

I would do my part as well and try to upload stuff to a different branch.

I will keep you posted as well on what I'm doing. I just finished a mildly working version of the menu in class; I'll send it as soon as I get home should you want to try it instead of rolling back to earlier versions.

Edit: I've pushed a version that should mostly work. I still am working on getting both the paginated and the non-paginated versions to work together, but that will be done in a separate branch.

Tuxman2 commented 2 years ago

Hi heqro,

I tried your paginatePlusScroll version from here. The pagination with the scrolling work and it is very good (like 'Launchpad plasma menu' did). But I encounter 2 bugs:

  1. The favorites are not displayed on the screen when the paginate option is enabled.
  2. When we use the search bar, it doesn't come to its initial state with the paginate option enable.

Despite those 2 bugs, I like what you did. Good work. ;-)

heqro commented 2 years ago

Hi,

The favorites are not displayed on the screen when the paginate option is enabled.

I did not run into this bug, but then again I was still working on that branch in order to make sure people didn't get the wrong idea that everything that is in the master branch is ready to use.

When we use the search bar, it doesn't come to its initial state with the paginate option enable.

This should be fixed now.

All in all, I moved into the paginatePlusScroll version so as to avoid people directly downloading from master and getting the idea that the menu didn't work when I was actually just testing and breaking stuff. From now on, I will work on the other branch and merge results with the master branch when I see fit just to make sure there is no confusion.

If you happen to find any other bugs please do tell me, though. I would advise to only keep tracking the master branch though, for I will (try my best to) post all the functional stuff in there and keep testing on separate branches. I push into Github just in case my computer suddenly stops working or something.

Edit: if you think this issue is fixed, please tell me so as to close it as well.

Tuxman2 commented 2 years ago

Hi,

I tried your last master branch version. Paginate option doesn't work at my home (no applications grid displayed). I will try your last and new paginatePluScroll version to see how it works.

Regards.

heqro commented 2 years ago

Yes,master version is still outdated. Please try the branch and tell me what you think.

Tuxman2 commented 2 years ago

I'm come back to you. With the PaginateplusScroll Branch it is good.

Here is what I noticed :

  1. If I register one or more character(s) in the search bar and that I apply the ESC button, the search bar returns to its original state. On the other hand, if I click on the search bar without writing a character and that I apply the ESC button, the search bar does not return to its initial state and the menu disappears. In this case, the search bar should come back to its initial state too.

  2. Regarding the favorites, they do not work when the paginated option is enabled. The option for the favorites is grayed when the paginate option is activated. So, for now, the favorites can't be displayed on paginate mode.

Regards.

heqro commented 2 years ago

If I register one or more character(s) in the search bar and that I apply the ESC button, the search bar returns to its original state. On the other hand, if I click on the search bar without writing a character and that I apply the ESC button, the search bar does not return to its initial state and the menu disappears. In this case, the search bar should come back to its initial state too.

This should work now (on the paginate... branch).

Regarding the favorites, they do not work when the paginated option is enabled.

I can't reproduce, how many favorites do you have? Perhaps I should start working on something I didn't expect to (paginating the favorites as well as the rest of the menu categories).

Edit: I finally realized what you meant with the favorites. I purposely grayed out the option because I am still looking for a good way to integrate them in a visually pleasant way. As a workaround for now, you can enable the Favorites category from the categories sidebar.

Tuxman2 commented 2 years ago

This should work now (on the paginate... branch).

All right. ;-)

Edit: I finally realized what you meant with the favorites. I purposely grayed out the option because I am still looking for a good way to integrate them in a visually pleasant way. As a workaround for now, you can enable the Favorites category from the categories sidebar.

I was thinking about your project. To avoid you to work on two separate projects (paginate mode and no paginate mode), why you don't decide to define paginate as default.

Here is my thought. Wouldn't the ideal solution be for your menu to move towards a menu similar to Gnome 40/41 and/or launchpad plasma but with added value which would be the addition of categories (which Gnome 40/41 and launchpad plasma do not have). Like Gnome 40 and launchpad plasma, move favorites at the bottom of the page or on the sides (what was happening under Gnome 3.3x). In short, categories on one side and favorites on the opposite, or, favorites at the bottom of the page, categories to left or right, and session buttons placed in another place (upper right corner as on launchpad plasma for example or lower). Or, Why not move the session buttons with the favorites (something similarly as we can see in cinnamon menu but with the design of Gnome 40/41). Something who could be like this (of course, icons in the right position):

favoritessessionbuttons

Move the favorites at the bottom of the screen will not be a problem with the paginate scrolling. Of course, these are just my suggestions to improve your project, and to avoid to you complications in the implementation of this one in the future.

Regards.

heqro commented 2 years ago

I was thinking about your project. To avoid you to work on two separate projects (paginate mode and no paginate mode), why you don't decide to define paginate as default.

If by default you mean leaving the scrollable implementation away, I am feeling uneasy about that because the project originally started due the Launchpad's implementation of pagination working extremely bad in my laptop. That's the reason why I decided to go my own way without paginating.

Then, after I found how to paginate the menu thanks to your concern about it, I made something good enough for your use case, but still not good enough for mine. You see, Wayland is extremely sluggish on my machine, so I will be trapped with the scrollable option for the time being: I am the first one interested in developing both "styles", at least for now.

Moreover, you mentioned some jerks in the video I sent you of me using the new paginated menu - sadly that's how the implementation works in my machine. Wayland's way of working with touchpads is weird. I don't like how sensitive mine is in there. Edit: just found out touch sensibility can be tweaked now on Wayland. Whoops. Now the menu works without jerks in my touchpad, yet the Wayland session still is immensely sluggish.

Like Gnome 40 and launchpad plasma, move favorites at the bottom of the page or on the sides

Yes, that's what I will do. The only reason the favorites were shown at the top of the grid is because someone proposed it, but I don't know if that particular user does still care. In my opinion it looks out of place.

and session buttons placed in another place (upper right corner as on launchpad plasma for example or lower).

In my honest opinion, the way it looks in there is hideous. I thank the other project for being a solid point I could build from, but... yeah, that was a creative design solution.

Tuxman2 commented 2 years ago

Hi heqro,

I don't encounter any problems with your menu under Wayland but I've got a powerfull laptop (Intel i7 with 16Gb ram).

If you decide to move the favorites at the bottom of the screen (like Gnome 40/41 and Launchpad plasma), a reorganization of the favorites will be possible (as we can see in Gnome40/41 and in 'Launchpad plasma' menu) by moving them with the mouse. Now, is it a good idea to place the sessions buttons with the favorites (like we can see in Cinnamon menu), or move the sessions buttons in another place on the screen. It's up to you to decide.

Regards.

heqro commented 2 years ago

Now, is it a good idea to place the sessions buttons with the favorites (like we can see in Cinnamon menu), or move the sessions buttons in another place on the screen. It's up to you to decide.

I like how it is now, but I will see if the concepts I find (like the one you sent by this issue) look convincing enough. For now, I am closing this particular issue because the support for touchscreen seems to be good enough with the paginated version. I'll be on the lookout for implementing the favorites bit.