feat: Centralize shared keyboard options#1304
Conversation
There was a problem hiding this comment.
Thanks for picking up such an old one, @thetwai-dev — and for digging into the keyboard options. I ran both approaches on an emulator (Pixel 7, Gboard) to ground this. A couple of things before it can land:
1. KeyboardType.Password — it works, with one tradeoff.
On Gboard it's actually the only approach that hides the suggestion strip. I also tried the "proper" route — InterceptPlatformTextInput + TYPE_TEXT_FLAG_NO_SUGGESTIONS — and Gboard ignores it: the strip still shows even with autocorrect disabled. So your choice is the right one for Gboard. The one visible tradeoff is that Gboard switches to its password layout (number row, no emoji/glide keys). I'm deferring the final yes/no on the approach to @Elforama since he researched this previously.
2. Scope — this is one field of several. #736 asks to hide suggestions on all text inputs. These still use KeyboardType.Text with suggestions on:
ChatScreen.kt:170SessionNoteScreen.kt:104NameEntryView.kt:107and:134AddWalletScreen.kt:110
Rather than copy-paste the same option into each, please centralize it — a single shared KeyboardOptions constant (or a small shared text-field composable) that all these fields use. Then change Fixes #736 → Addresses #736 so the issue stays open until every field is covered.
3. Minor — API consistency. You switched this one call site to autoCorrectEnabled while 7 others still use the deprecated autoCorrect. Both compile on Compose 1.7.5, but let's not mix spellings — migrate them together (ideally via the shared component above) or leave this one as autoCorrect for now.
No rush — happy to help once the approach is settled with Jonathan.
|
✅ Thanks @thetwai-dev — required media detected. Nothing more needed here! |
|
For a single shared And for this issue, I'm just waiting for @Elforama to give the greenlight. |
|
A single shared text input "template" that does it's best to hide the unneeded suggestions bar sounds great. |
|
@Elforama |
|
No, only logic and\or config to avoid any extra keyboard tools. The input type should be per usecase |
|
Ok, then I'll only centralize common keyboard options and leave the keyboard type as it is. (And this issue wouldn't be fully fixed by this pr yet) |
cf682cd to
5554f57
Compare
|
The shared keyboard option only has 2 properties since those were the most common one that I could find. However, I believe there could be more default options we might want to add, and those values can be overwritten with .copy(..). This also fixes the API inconsistency with |
|
@thetwai-dev Please attach a video showing the text fields working as well as fixing the merge conflict. |
896ab86 to
306c0b7
Compare
2026-07-16.18-38-23.mp4 |
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
./codeAnalysisto automatically apply formatting/linting)📸 Proof of change (REQUIRED)
🎥 Screen recording / video (always required)
🖼️ Screenshots (required for any UI change)
non-uilabel. A video is still required even for non-UI changes.Addresses #736 partially. Only organize code, not hide suggestions.