scribe-org / scribe-org/Scribe-Android
Code improvements to make Scribe ready for future features
Open
@growabeard is already working on this.
Since Sep 13, 2026.
-priority-
hackathon
refactor
- Dominant language
- C++
- Stars
- 99
- Forks
- 121
- Avg merge
- 4d 7h
- Merged PRs (30d)
- 16
Description
Terms
- I have searched open and closed feature requests
- I agree to follow Scribe-Android's Code of Conduct
Description
After working on Add invalid state to keyboard commands and show localized Not in Wikidata and app crashing at startup on api 30 I've noticed some issues, which could lead to maintenance problems in future, and also push away potential maintainers.
Specifically, I see problems with GeneralKeyboardIME and and classes inheriting it.
Main things that, in my opinion, should be addressed:
- GeneralKeyboardIME mixes view management, database access, state handling, and business logic in ~2,100 lines. The suppression of TooManyFunctions and LargeClass hints at maintainability issues. This makes it difficult for potential contributors to understand or extend the code.
- isTablet duplicates in every subclass
- heavy use of non-null assertions (!!) in the subclasses when setting up the keyboard view
- fuzzy state management without stateholder
- base class knows about classes inheriting it (i.e baseKeyboardOfAnyLanguage function and many others)
- languages logic is based on strings comparison instead enums or sealed classes (i.e getLanguageAlias function)
- various code style issues (like using "when" in setupCommandBarTheme function), invalid log tags (like "my-tag") and so on
Contribution
I would like to discuss if necessary and fix some of listed problems in one (or multiple) separate PR's
Let me know, if you ok with it
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.