Created attachment 178353 [details] Search results for Romanian language SUMMARY Add Layout search gives results in the wrong order STEPS TO REPRODUCE 1. Open System Settings. 2. Navigate to Keyboard. 3. Click on the Enable toggle to be able to add a few layouts. 4. Click on the + Add... button to add a new layout. 5. Search for 'Romanian', 'French', 'German', 'Spanish'. OBSERVED RESULT The items on the country / variant (right column) are more important than the items on the language (column). So the language suggestions are in the left column are based on the items in the right column. In my case with the Romanian language, where I noticed the problem, the first language suggestion should be Romanian. If any country variant should be suggested then it should be Moldova, not Germany as Moldova is the only other country where Romanian is spoken and written: https://en.wikipedia.org/wiki/Romanian_language#/media/File:Idioma_rumano.PNG But with the laws they passed last year the Moldovan language should not be used anymore as it's just Romanian and they should call it Romania so I don't think it has a variant, but if they one day they say it does, then this is the only other country / variant that should be suggested for Romanian language. Anyway I think the same problem exists for other languages too. EXPECTED RESULT Match languages first on the left column, so the the more exact / close that what has been typed the more higher up in the list. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 6.3.0 KDE Frameworks Version: 6.10.0 Qt Version: 6.7.2 Kernel Version: 6.12.13-amd64 (64-bit) Graphics Platform: Wayland HARDWARE SPECIFICATIONS Hardware: Laptop Dell Inspiron 5770 (17" 1080p@60Hz screen) CPU: Intel® Core™ i5-8250U CPU @ 1.60GHz GPU 1: Mesa Intel® UHD Graphics 620 (main) GPU 2: AMD Radeon R5 M465 Series RAM: 8 GiB (7.7 GiB usable)
From a technical perspective, this is correct since the lists are both ordered alphabetically. However I see how it's not ideal in this specific use case. Perhaps we could prioritize exact matches in the left column.
I agree that it's correct by search on both columns, but for my use case and usability in general I think that the language should be prioritized as the user searches for the languages mainly. Then of course, if there are more variants / countries) maybe it wants to choose that, if the default is not the right one. Honestly I'm not even sure why the right column is searched at all. I can't think of a language right now that can be found on the right column and not on the left. One other thing that could be done after the language is matched on the left column, would be to order the variants by country size in population to have more chances of suggesting the right one for the user. Like: English - > United States (first in the right column) German -> Germany (first in the right column) French -> France (first...) Italian -> Italy (first...) Romanian -> (Romanian standard, instead of Romanian, here as that's the one that most of us use and it has the right diacritics, but I think this needs a bug report with a bit more documentation on my side). It would be a bit weird for Spanish as Spain not being the first, but at least it will be the suggestion that most people wanted. But anyway, that would probably take a lot of time to implement. So, I at least, would be happy with prioritizing the left column.
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/2840
Git commit bd50c79c4813b19aa8cbe2cf706de849430151f6 by Nate Graham, on behalf of Bharadwaj Raju. Committed on 03/03/2025 at 21:38. Pushed by ngraham into branch 'master'. kcms/keyboard: implement fuzzy search for layouts Implements scored fuzzy search for layouts using KFuzzyMatcher. FIXED-IN: 6.4.0 M +1 -0 kcms/keyboard/CMakeLists.txt M +5 -5 kcms/keyboard/layoutmodel.h A +70 -0 kcms/keyboard/layoutsearchmodel.cpp [License: GPL(v2.0+)] A +38 -0 kcms/keyboard/layoutsearchmodel.h [License: GPL(v2.0+)] M +2 -0 kcms/keyboard/qml/plugin.cpp M +30 -27 kcms/keyboard/ui/LayoutDialog.qml https://invent.kde.org/plasma/plasma-desktop/-/commit/bd50c79c4813b19aa8cbe2cf706de849430151f6