Skip to content

Conversation

@bhanu-dev82
Copy link
Collaborator

Contributor checklist


Description

This pull request refactors GeneralKeyboardIME to improve separation of concerns by extracting UI-related logic into a dedicated KeyboardUIManager.

Summary of changes

  • Extracted UI handling logic from GeneralKeyboardIME.kt into a new KeyboardUIManager.kt
  • Simplified GeneralKeyboardIME so it focuses primarily on InputMethodService lifecycle and coordination
  • Updated existing tests by refactoring GeneralKeyboardIMETest.kt to reflect the new architecture
  • Added new test coverage in KeyboardUIManagerTest.kt to validate UI state handling independently

Related issue

Closes #540

@github-actions
Copy link

Thank you for the pull request! 💙

The Scribe-Android team will do our best to address your contribution as soon as we can. If you're not already a member of our public Matrix community, please consider joining! We'd suggest that you use the Element client as well as Element X for a mobile app, and definitely join the General and Android rooms once you're in. Also consider attending our bi-weekly Saturday dev syncs. It'd be great to meet you 😊

Note

Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible.

@github-actions
Copy link

github-actions bot commented Jan 23, 2026

Maintainer Checklist

The 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 :)

  • Tests for changes have been written and the unit test, linting and formatting workflows within the PR checks do not indicate new errors in the files changed

    • Tests may need to be reran as they're at times not deterministic
  • The CHANGELOG has been updated with a description of the changes for the upcoming release and the corresponding issue (if necessary)

@andrewtavis
Copy link
Member

Thanks for the issue and the PR, @bhanu-dev82! We'll try to finalize the review in the coming days :)

Copy link
Member

@angrezichatterbox angrezichatterbox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work @bhanu-dev82
Thanks for adding the tests along with it.

@andrewtavis
Copy link
Member

Would one of you be able to fix the failing tests, @bhanu-dev82 or @angrezichatterbox? :)

@angrezichatterbox
Copy link
Member

I would be able to look into it later today evening.

@angrezichatterbox angrezichatterbox force-pushed the refactor/keyboard-ui-manager branch from 56a7896 to eb139b6 Compare January 28, 2026 17:41
@angrezichatterbox
Copy link
Member

@andrewtavis It is ready for review :)

@andrewtavis
Copy link
Member

praise: Hey @bhanu-dev82 and @angrezichatterbox! All's generally working well, and this is really improving the structure of the code!
note [blocking]: I noticed one thing that should be fixed before merge. The color of the shift key isn't changing anymore, so you don't know if you'll be typing a capital letter or are in caps lock anymore. Could we take a look as to why this is happening?

@angrezichatterbox
Copy link
Member

praise: Hey @bhanu-dev82 and @angrezichatterbox! All's generally working well, and this is really improving the structure of the code! note [blocking]: I noticed one thing that should be fixed before merge. The color of the shift key isn't changing anymore, so you don't know if you'll be typing a capital letter or are in caps lock anymore. Could we take a look as to why this is happening?

I would look into it now

@andrewtavis
Copy link
Member

Looks like we'll need to run update_i18n_keys.sh to fix the merge conflicts here as well, @angrezichatterbox :)

@andrewtavis
Copy link
Member

Just ran update_i18n_keys.sh on main, so we shouldn't have conflicts there once the branch has the latest commit :)

@angrezichatterbox angrezichatterbox force-pushed the refactor/keyboard-ui-manager branch from d840ca4 to 3fe946a Compare January 30, 2026 16:21
@angrezichatterbox
Copy link
Member

I am not sure if what I did is right. Could you have a look @andrewtavis for the submodule

@angrezichatterbox angrezichatterbox force-pushed the refactor/keyboard-ui-manager branch from 1245f7a to 847e2e4 Compare January 30, 2026 18:39
Copy link
Member

@andrewtavis andrewtavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: All's working perfectly now, @bhanu-dev82 and @angrezichatterbox! Thank you both for this whole process! A very important issue, a great execution and also finishing touches to bring all of this in 😊

@andrewtavis andrewtavis merged commit c2416a3 into scribe-org:main Jan 30, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Extract UI Management from GeneralKeyboardIME to KeyboardUIManager

3 participants