Skip to content

Feat: Shifting to Compose - #686

Open
Roniscend wants to merge 7 commits into
scribe-org:mainfrom
Roniscend:Hello-Compose
Open

Feat: Shifting to Compose #686
Roniscend wants to merge 7 commits into
scribe-org:mainfrom
Roniscend:Hello-Compose

Conversation

@Roniscend

@Roniscend Roniscend commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes: #657 I have added all the new features which were introduced here like floating keyboard etc.


Roniscend added 6 commits July 9, 2026 02:38
# Conflicts:
#	app/src/keyboards/java/be/scri/helpers/ui/KeyboardUIManager.kt
#	app/src/keyboards/java/be/scri/services/GeneralKeyboardIME.kt
#	app/src/main/java/be/scri/views/KeyboardView.kt
#	app/src/main/res/layout-land/keyboard_view_keyboard.xml
#	app/src/main/res/layout/input_method_view.xml
# Conflicts:
#	app/src/keyboards/java/be/scri/helpers/FloatingKeyboardHandler.kt
#	app/src/keyboards/java/be/scri/helpers/ui/KeyboardUIManager.kt
#	app/src/keyboards/java/be/scri/services/GeneralKeyboardIME.kt
Copilot AI lite review requested due to automatic review settings August 24, 2026 22:06
@Roniscend

Copy link
Copy Markdown
Collaborator Author

@andrewtavis I was working on this since a very long time, Sorry for the delay but now I am very excited for this pr and would love your and @angrezichatterbox reviews on this

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR continues the keyboard refactor toward Jetpack Compose (Fixes #657), replacing the legacy View/XML-based IME UI (top bars, emoji palette, clipboard panel, conjugation UI, floating keyboard chrome) with new Compose equivalents and removing the old supporting layouts/drawables/adapters/handlers.

Changes:

  • Introduces a new Compose-driven keyboard UI surface (top bars, keyboard rendering, emoji panel, clipboard panel, conjugation grid, info banner).
  • Reworks keyboard infrastructure to better support Compose and floating keyboard behavior (new lifecycle owner, updated keyboard layout handling, refactored DB usage patterns).
  • Removes legacy View-based UI resources and implementation classes that are no longer used after the Compose shift.

Reviewed changes

Copilot reviewed 77 out of 77 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
app/src/testKeyboards/kotlin/be/scri/helpers/ui/KeyboardUIManagerTest.kt Removes Robolectric tests tied to the removed ViewBinding-based keyboard UI.
app/src/testKeyboards/kotlin/be/scri/helpers/ui/KeyboardThemeManagerTest.kt Removes tests for the deleted KeyboardThemeManager.
app/src/testKeyboards/kotlin/be/scri/helpers/data/EmojiDataManagerTest.kt Adds unit test coverage for EmojiDataManager keyword map behavior.
app/src/main/res/values/dimens.xml Adjusts key height dimension for the new UI sizing.
app/src/main/res/layout/keyboard_popup_keyboard.xml Removes legacy popup keyboard layout (View-based).
app/src/main/res/layout/keyboard_key_preview.xml Removes legacy key preview layout (View-based).
app/src/main/res/layout/item_emoji.xml Removes legacy emoji item layout (RecyclerView-based palette).
app/src/main/res/layout/item_emoji_category_title.xml Removes legacy emoji category header layout.
app/src/main/res/layout/input_method_view.xml Removes the legacy IME root layout (replaced by Compose).
app/src/main/res/layout/emoji_key_long_hold_popup.xml Removes legacy emoji long-press popup layout.
app/src/main/res/layout/conjugate_grid.xml Removes legacy conjugation grid layout.
app/src/main/res/layout/conjugate_grid_3x2.xml Removes legacy conjugation grid variant.
app/src/main/res/layout/conjugate_grid_2x2.xml Removes legacy conjugation grid variant.
app/src/main/res/layout/conjugate_grid_2x1.xml Removes legacy conjugation grid variant.
app/src/main/res/layout/conjugate_grid_1x3.xml Removes legacy conjugation grid variant.
app/src/main/res/layout/clipboard_item.xml Removes legacy clipboard item layout (RecyclerView-based).
app/src/main/res/layout-land/keyboard_view_keyboard.xml Removes legacy landscape keyboard layout.
app/src/main/res/layout-land/keyboard_key_preview.xml Removes legacy landscape key preview layout.
app/src/main/res/drawable/scribe_key_background_left_rounded.xml Removes legacy drawable used by the removed View UI.
app/src/main/res/drawable/minikeyboard_background.xml Removes legacy mini-keyboard background drawable.
app/src/main/res/drawable/keyboard_space_background.xml Removes legacy space key background drawable.
app/src/main/res/drawable/keyboard_key_selector.xml Removes legacy selector used for View key press/mini-keyboard focus.
app/src/main/res/drawable/keyboard_key_selector_dark.xml Removes legacy dark selector.
app/src/main/res/drawable/keyboard_key_background.xml Removes legacy key background drawable.
app/src/main/res/drawable/keyboard_enter_background.xml Removes legacy enter key background drawable.
app/src/main/res/drawable/ic_translate_command.xml Removes legacy command icon drawable.
app/src/main/res/drawable/ic_resize_corner.xml Removes legacy resize corner icon drawable.
app/src/main/res/drawable/ic_plural_command.xml Removes legacy plural command icon drawable.
app/src/main/res/drawable/ic_drag_handle.xml Removes legacy drag handle icon drawable.
app/src/main/res/drawable/ic_custom_cursor.xml Removes legacy custom cursor drawable.
app/src/main/res/drawable/ic_conjugate_command.xml Removes legacy conjugate command icon drawable.
app/src/main/res/drawable/gender_suggestion_button_right_background.xml Removes legacy gender suggestion background drawable.
app/src/main/res/drawable/gender_suggestion_button_left_background.xml Removes legacy gender suggestion background drawable.
app/src/main/res/drawable/floating_keyboard_background.xml Removes legacy floating keyboard background drawable.
app/src/main/res/drawable/emoji_tablet_background_rounded.xml Removes legacy emoji suggestion background drawable.
app/src/main/res/drawable/emoji_phone_background_rounded.xml Removes legacy emoji suggestion background drawable.
app/src/main/res/drawable/cmd_key_background_rounded.xml Removes legacy command key background drawable.
app/src/main/res/drawable/cmd_bar_prompt_background.xml Removes legacy command bar prompt drawable.
app/src/main/res/drawable/cmd_bar_background_right_rounded.xml Removes legacy command bar background drawable.
app/src/main/res/drawable/clouddownload_keyboard.xml Removes legacy composed drawable used by the old banner.
app/src/main/res/drawable/clipboard_item_bg.xml Removes legacy clipboard card background drawable.
app/src/main/res/drawable/clipboard_background.xml Removes unused/empty legacy selector.
app/src/main/java/be/scri/ui/theme/ScribeTheme.kt Adds keyboard-specific dark mode resolution helper for Compose UI.
app/src/main/java/be/scri/ui/screens/settings/SettingsViewModelFactory.kt Uses applicationContext when constructing SettingsViewModel.
app/src/main/java/be/scri/ui/screens/settings/SettingsViewModel.kt Switches to applicationContext for preferences and initialization work.
app/src/main/java/be/scri/ui/screens/ConjugationSelectionScreen.kt Updates conjugation resolution call to pass an opened DB instance.
app/src/main/java/be/scri/ui/compose/TopBars.kt Adds Compose top bar implementations for multiple keyboard states.
app/src/main/java/be/scri/ui/compose/ScribeKeyboardApp.kt Adds the Compose entry composition for the keyboard surface and panels.
app/src/main/java/be/scri/ui/compose/KeyboardViewModel.kt Adds a StateFlow-based state holder for the Compose keyboard UI.
app/src/main/java/be/scri/ui/compose/KeyboardActionListener.kt Defines Compose UI -> IME action interface.
app/src/main/java/be/scri/ui/compose/InfoWikiBanner.kt Adds Compose info/wiki banner UI for invalid state.
app/src/main/java/be/scri/ui/compose/IMSLifecycleOwner.kt Adds Lifecycle/ViewModelStore/SavedState host for Compose in InputMethodService.
app/src/main/java/be/scri/ui/compose/FloatingKeyboardChrome.kt Adds Compose-based floating keyboard drag/resize chrome.
app/src/main/java/be/scri/ui/compose/EmojiKeyboardPanel.kt Adds Compose-based emoji keyboard/palette UI.
app/src/main/java/be/scri/ui/compose/ConjugateGrid.kt Adds Compose-based conjugation grid UI.
app/src/main/java/be/scri/ui/compose/ComposeKeyboardView.kt Adds Compose-based keyboard key rendering + touch handling + long-press alt popup.
app/src/main/java/be/scri/ui/compose/ClipboardPanel.kt Adds Compose-based clipboard panel UI and actions.
app/src/main/java/be/scri/helpers/PreferencesHelper.kt Adjusts system dark mode detection logic used by preferences.
app/src/main/java/be/scri/helpers/KeyboardBase.kt Updates keyboard parsing/row sizing logic (incl. conjugate layout handling).
app/src/main/java/be/scri/helpers/EmojiAdapter.kt Removes legacy RecyclerView adapter for emoji palette.
app/src/main/java/be/scri/helpers/data/ConjugateDataManager.kt Refactors to reuse a single opened conjugate DB and closes cursors safely.
app/src/main/java/be/scri/helpers/data/AutoSuggestionDataManager.kt Ensures language DB is closed via use.
app/src/main/java/be/scri/helpers/clipboard/ClipboardAdapter.kt Removes legacy RecyclerView adapter for clipboard panel.
app/src/main/java/be/scri/helpers/AutoGridLayoutManager.kt Removes legacy RecyclerView grid layout helper.
app/src/keyboards/java/be/scri/services/GermanKeyboardIME.kt Removes obsolete refactor comment related to no-longer-abstract binding/keyboardView.
app/src/keyboards/java/be/scri/services/FrenchKeyboardIME.kt Removes obsolete refactor comment related to no-longer-abstract binding/keyboardView.
app/src/keyboards/java/be/scri/helpers/ui/KeyboardThemeManager.kt Removes legacy View-based theme manager (replaced by Compose/theme helpers).
app/src/keyboards/java/be/scri/helpers/SpaceKeyProcessor.kt Switches to ime.setShifted(...) instead of directly mutating/invalidation.
app/src/keyboards/java/be/scri/helpers/KeyHandler.kt Updates mode change / shift handling signatures; removes direct invalidation calls.
app/src/keyboards/java/be/scri/helpers/FloatingKeyboardHandler.kt Removes legacy View-based floating keyboard handler (replaced by Compose chrome).
app/src/keyboards/java/be/scri/helpers/clipboard/ClipboardHandler.kt Removes legacy View-based clipboard handler (replaced by Compose panel).
app/src/keyboards/java/be/scri/helpers/BackspaceHandler.kt Updates shift/hint handling to align with the new state-driven UI.
app/src/keyboards/java/be/scri/activities/MainActivity.kt Removes unused EnglishKeyboardIME instance creation from Activity.
app/src/androidTestKeyboards/kotlin/be/scri/helpers/KeyboardTest.kt Updates Android test setup to not depend on removed binding fields.
Suppressed comments (2)

app/src/main/java/be/scri/ui/compose/TopBars.kt:89

  • EmptyStateBanner uses a hard-coded English string. The rest of the app uses string resources (stringResource) for localization, and the previous XML banner used @string/i18n.app._global.download_data.
            Text(
                text = "Please download language data",
                color = textColor,
                fontSize = 16.sp
            )

app/src/main/java/be/scri/ui/compose/ConjugateGrid.kt:26

  • language is collected but never used in this composable; removing it avoids unnecessary recompositions and lint warnings.
    val language by viewModel.language.collectAsState()

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/src/main/java/be/scri/ui/screens/ConjugationSelectionScreen.kt
Comment thread app/src/main/java/be/scri/ui/compose/TopBars.kt Outdated
Comment thread app/src/main/java/be/scri/ui/compose/TopBars.kt Outdated
Comment thread app/src/main/java/be/scri/ui/compose/ConjugateGrid.kt Outdated
Comment thread app/src/main/java/be/scri/helpers/PreferencesHelper.kt Outdated
Comment thread app/src/main/java/be/scri/ui/theme/ScribeTheme.kt
@andrewtavis

Copy link
Copy Markdown
Member

Thanks for all the work you've been putting in, @Roniscend! Let me just check what the plan is here:

  • Would you say that we should try to bring this in before the MVP?
  • Would you say that if we bring this in, then the current PRs are going to have lots of merge conflicts?

I'm just trying to figure out how to prioritize this. I think that the current -next release- PRs should be brought in before. After that we have #601 and #648 that are priorities, but then how much of a conflict would either of those have with this one?

And what's the plan with the failing tests? Do they need to be rewritten given the new architecture, so the ideality would be that we approve the functionality and then we can move on to fixing the tests?

Again thanks so much for your efforts! 😊

Signed-off-by: Owm <owmdubey163@gmail.com>
@Roniscend

Copy link
Copy Markdown
Collaborator Author

Thanks for all the work you've been putting in, @Roniscend! Let me just check what the plan is here:

  • Would you say that we should try to bring this in before the MVP?
  • Would you say that if we bring this in, then the current PRs are going to have lots of merge conflicts?

I'm just trying to figure out how to prioritize this. I think that the current -next release- PRs should be brought in before. After that we have #601 and #648 that are priorities, but then how much of a conflict would either of those have with this one?

And what's the plan with the failing tests? Do they need to be rewritten given the new architecture, so the ideality would be that we approve the functionality and then we can move on to fixing the tests?

Again thanks so much for your efforts! 😊

To bring this in before MVP, that’s entirely your call.
also for the priorities prs #601 and #648 I have implemented them as well here
I also fixed all the ci failures

@andrewtavis

Copy link
Copy Markdown
Member

One thing that I'm seeing from the screenshots is that floating keyboard is still a command key and not an option on the emoji key. Could we switch it to a long hold option on the emoji key?

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 keyboard to use Jetpack Compose

3 participants