Move keyboard logic inside keyboard flavour#583
Open
rovertrack wants to merge 1 commit intoscribe-org:mainfrom
Open
Move keyboard logic inside keyboard flavour#583rovertrack wants to merge 1 commit intoscribe-org:mainfrom
rovertrack wants to merge 1 commit intoscribe-org:mainfrom
Conversation
Thank you for the pull request! 💙🩵The Scribe-Android team will do our best to address your contribution as soon as we can. The following are some important points:
Note Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible. |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :)
|
2 tasks
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.
#546
Contributor checklist
./gradlew lintKotlin detekt testcommand as directed in the testing section of the contributing guidenote : i agree i have used "AI" only when i couldn't find the best possible ways to resolve some of the dependency required by both keyboard and conjugate , so its a little bit of ai boilerplate optimized by me.
The main problem - dependency chain
AboutScreenrequiredHintUtils.resetHints()HintUtilswas full of keyboard logic and needed the ScribeState enum.ScribeStatecame fromGeneralKeyboardIMEwhich was moved to keyboard flavor for isolatingTo resolve this
moved
ScribeStateto its own file (in main).We moved the
resetHints()function fromHintUtilstoPreferencesHelper.AboutScreennow callsPreferencesHelper.resetHints(), now no keybaord files are required - complete isolationThe
KeyboardViewwould cast its context toGeneralKeyboardIMEto update hint visibility. nowGeneralKeyboardIMEimplements a listener. It receives the event and then it calls HintUtils (which it can see now as they are in the same flavor).
OnKeyboardActionListenerthis is the listener , this was implemented becauseinput_method_view.xmlwas in the main folder and moving this would cause other break other xml layouts so this listener is a no - op in conjugate and used only in keyboard flavoradded AndroidManifest for keyboard to strip compiling of keyboard only services from main to only compile it in keybaord flavor
moved from main/ to keyboard/
helpers only required by keyboard
helpers/
ui /
services only required by keyboard
services /
views only required by keyboard
views/
AboutUtilTest.kt- I updated this to mock PreferencesHelper instead of HintUtils.
KeyboardUIManagerTest.kt moves to src/testkkeyboards as the keybarod service this test required is available in keybaord flavor
@andrewtavis , @angrezichatterbox my focus was fully into isolating the keyboard flavor , please test the app for proper working.
thanks