Add a GUI option for choosing the input method
Needs ReviewPublic

Authored by filipf on Jul 21 2019, 7:07 PM.

Details

Reviewers
ngraham
davidedmundson
Group Reviewers
Plasma
VDG
Summary

This exposes an existing SDDM InputMethod option and can function as a workaround for: https://github.com/sddm/sddm/issues/952

Test Plan

Diff Detail

Repository
R123 SDDM Configuration Panel (KCM)
Branch
add-input-method-combobox (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 14235
Build 14253: arc lint + arc unit
filipf created this revision.Jul 21 2019, 7:07 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJul 21 2019, 7:07 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Jul 21 2019, 7:07 PM
filipf edited the test plan for this revision. (Show Details)Jul 21 2019, 7:08 PM
filipf added reviewers: Plasma, VDG, ngraham, davidedmundson.
filipf updated this revision to Diff 62233.Jul 21 2019, 8:18 PM

combobox strings shouldn't be translatable

Why is there a blank entry? Also these hardcoded values make me feel a little leery. Is there a way we can programmatically generate them or get them from SDDM or something?

Why is there a blank entry?

The blank entry is sort of the whole point of the option. The way to fix the virtual keyboard popping up on its own with some themes is to leave InputMethod empty:

https://github.com/MarianArlt/sddm-sugar-light/issues/2#issuecomment-439741458
https://www.reddit.com/r/kde/comments/7lk2bs/onscreen_keyboard_on_sddm/

Also these hardcoded values make me feel a little leery. Is there a way we can programmatically generate them or get them from SDDM or something?

Not that I know of. The only time they're mentioned in the SDDM codebase is in this documentation file: https://github.com/sddm/sddm/blob/develop/data/man/sddm.conf.rst.in

Also these hardcoded values make me feel a little leery. Is there a way we can programmatically generate them or get them from SDDM or something?

Not that I know of. The only time they're mentioned in the SDDM codebase is in this documentation file: https://github.com/sddm/sddm/blob/develop/data/man/sddm.conf.rst.in

Okay, that's fine.

Why is there a blank entry?

The blank entry is sort of the whole point of the option. The way to fix the virtual keyboard popping up on its own with some themes is to leave InputMethod empty:

https://github.com/MarianArlt/sddm-sugar-light/issues/2#issuecomment-439741458
https://www.reddit.com/r/kde/comments/7lk2bs/onscreen_keyboard_on_sddm/

So maybe this entry should be called "System Default" or something then? Having an empty entry in the combobox is just a really weird UI. Also, I feel like the mapping between this UI and the actual bug is not very clear. If the purpose is to work around that bug, IMO the UI should reflect that. If on the other hand the feature has more general utility, then the UI should make more clear just what it is and does, while somehow including a connection to the worked-around bug.

Does that make sense?

Yeah an empty entry is bad UI but it works for the code since it ends up just grabbing the text from the combobox and writing it to the config file :P ... it was a quick solution I'll admit.

The feature request was this, a much more straightforward idea: https://forum.kde.org/viewtopic.php?f=285&t=161536&p=420073#p420073

But having that checkbox seemed too specific and it seemed like having a general input method chooser might be more useful. What do you think?

Yeah an empty entry is bad UI but it works for the code since it ends up just grabbing the text from the combobox and writing it to the config file :P ... it was a quick solution I'll admit.

Instead of just passing the string in the combobox directly to whatever writes the value to the file, you'd need to translate the value first.

The feature request was this, a much more straightforward idea: https://forum.kde.org/viewtopic.php?f=285&t=161536&p=420073#p420073

But having that checkbox seemed too specific and it seemed like having a general input method chooser might be more useful. What do you think?

The generic solution you've implemented here makes sense if the features you're exposing actually work in SDDM with all themes (in which case, we need to improve the UI here). If not, maybe do the simple checkbox as suggested in that forum post.