refactor: extract SuggestionUIHandler from GeneralKeyboardIME (Part 11) (#426) - #685
Open
prince-0408 wants to merge 1 commit into
Open
Conversation
prince-0408
force-pushed
the
refactor/extract-suggestion-ui-handler-426
branch
from
August 24, 2026 19:48
8254a45 to
74bf7dc
Compare
prince-0408
force-pushed
the
refactor/extract-suggestion-ui-handler-426
branch
from
August 24, 2026 19:51
74bf7dc to
e5ec7f6
Compare
Member
|
Thanks for the PR, @prince-0408! We'll get this PR in soon after bringing in the autosuggestion PRs 😊 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR is Part 11 in modularizing
GeneralKeyboardIMEfor #426.It extracts auto-suggestion layout rendering, button styling, visibility toggling (between command buttons, gender suggestions, and emoji recommendations), and autocomplete button click handlers out of
GeneralKeyboardIME.ktinto a standalone helper classSuggestionUIHandler.Detailed Changes Table
SuggestionUIHandler.ktupdateAutoSuggestText), single/dual suggestion button styling (handleSingleType,handleMultipleNounFormats), word prediction updates (handleWordSuggestions), and autocomplete completions (updateAutocompleteSuggestions,clearAutocomplete).GeneralKeyboardIME.ktinto a focused helper component.SuggestionUIHandlerTest.ktSuggestionUIHandler.GeneralKeyboardIME.ktsuggestionUIHandlerand delegatedupdateAutoSuggestText,updateAutocompleteSuggestions, andclearAutocompleteto it. Removed private helper methods and unused extension functions.GeneralKeyboardIME.ktsize by ~400 lines (from 2,061 lines down to 1,662 lines) while maintaining 100% backward compatibility.Key Benefits
SuggestionUIHandlerTest.kttesting layout toggles and state synchronization.Related Issue
Refactors part of #426