lxqt / lxqt-panel

The LXQt desktop panel
https://lxqt-project.org
GNU Lesser General Public License v2.1
180 stars 135 forks source link

Improve FancyMenu search #1984

Closed gfgit closed 8 months ago

gfgit commented 8 months ago

Improve matching by doing case insensitive comparison. Also tweak code to not move cursor while typing

gfgit commented 8 months ago

This topic is also worth to mention if user language / application names use special unicode characters: https://invent.kde.org/multimedia/elisa/-/merge_requests/319

stefonarch commented 8 months ago

It's half OT but I was wondering why some items which are not shown in the categories (if "Leave" and "Preferences" are omitted in the menu file) were shown by the search, for example kvantum-manager or "Suspend" or "Leave" but none of thelxqt-config-* items.

It looks like adding utility in their .desktop files like Categories=Settings;DesktopSettings;Qt;LXQt;Utility; makes them retrievable by the search. So we could add this everywhere, as already "simple" menu doesn't include settings and we could add a fancy-applications-menu.

Of course other settings are out of our control and will be found only in Configuration-center.

Or maybe include searching by default also "LXQt" if possibile?

gfgit commented 8 months ago

It's half OT but I was wondering why some items which are not shown in the categories (if "Leave" and "Preferences" are omitted in the menu file) were shown by the search

Is the behavior different in MainMenu or "broken" in both?

stefonarch commented 8 months ago

Using "simple" menu which includes only lxqt-config it looks the same: "leave" items, kvantum-manager are found, settings not (except the one where I added "Utility").

It looks like the search includes akways one or both "System;X-Leave;" categories.

stefonarch commented 8 months ago

Ok, the solution looks simple: adding a category for all settings in the menu but not display it.

gfgit commented 8 months ago

This topic is also worth to mention if user language / application names use special unicode characters: https://invent.kde.org/multimedia/elisa/-/merge_requests/319

@tsujan what about unicode normalization?

gfgit commented 8 months ago

@tsujan also I forgot to remove comment about "keywords are already lowercase" which is not true anymore

tsujan commented 8 months ago

also I forgot to remove comment about "keywords are already lowercase" which is not true anymore

Sorry; I merged it because, first, it was OK, and second, as there was a discussion about other subjects on this page, I thought you might add a commit not related to the main goal. It's highly preferable to limit each PR to one subject. Next time I'll ask if your work is finished.

tsujan commented 8 months ago

what about unicode normalization?

I don't know. Isn't it an overdoing?

gfgit commented 8 months ago

also I forgot to remove comment about "keywords are already lowercase" which is not true anymore

Sorry; I merged it because, first, it was OK, and second, as there was a discussion about other subjects on this page, I thought you might add a commit not related to the main goal. It's highly preferable to limit each PR to one subject. Next time I'll ask if your work is finished.

See #1989 which removes the wrong comment

tsujan commented 8 months ago

See #1989 which removes the wrong comment

It doesn't need a review; please merge it yourself by pressing "Squash and merge" button.

gfgit commented 8 months ago

what about unicode normalization?

I don't know. Isn't it an overdoing?

I think it's useful for Chinese/Japanes/Korean language. But also for Dutch which has many accent and weird letters. We should ask a native speaker user

tsujan commented 8 months ago

We should ask a native speaker user

I agree.

stefonarch commented 8 months ago

I think italian and german beats dutch with accents.