Add swipe to delete, swipe to restore, and interactive onboarding tutorial #623
Open
prince-0408 wants to merge 3 commits into
Open
Add swipe to delete, swipe to restore, and interactive onboarding tutorial #623prince-0408 wants to merge 3 commits into
prince-0408 wants to merge 3 commits into
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 :)
|
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.
Closes #622
Summary
Implements swipe-based text editing and a one-time interactive onboarding tutorial
for Scribe Keyboard. Users can now swipe left to delete and swipe right to restore
text, with haptic feedback on each step. First-time users are guided through both
gestures via a live practice overlay before it dismisses itself.
What's changed
Swipe left — delete
45pxstep of travel80pxhorizontal threshold; aborts default key clickSwipe right — restore
stale restoration context
Interactive onboarding tutorial
swipe_tutorial_shownpreference"Scribe "is auto-inserted at tutorial start for immediate hands-on practiceTutorial steps
"Scribe ""Scribe "Files changed
Logic
KeyboardView.ktonSwipeLeft()andonSwipeRight()to the action listener interface. Tracks horizontal gesture travel inonModifiedTouchEvent(), aborts default click handling during swipe, fires haptic feedback.BackspaceHandler.ktdeletedChunksStack(java.util.Stack). AddedperformSwipeDelete()(push + delete) andperformSwipeRestore()(pop + insert). Stack clears on cursor movement or direct key input.GeneralKeyboardIME.ktSwipeTutorialStateenum (NOT_ACTIVE,SWIPE_LEFT_STEP,SWIPE_RIGHT_STEP,COMPLETED). Routes gesture events, drives tutorial step progression, auto-inserts"Scribe "at tutorial start.Layout & assets
input_method_view.xmlandroid:clickable="false"andandroid:focusable="false"on the tutorial overlay for touch pass-through. Redesigned to show one instruction, one illustration, and one action button at a time.ic_swipe_left.xmlic_swipe_right.xmlic_swipe_success.xmlTests
BackspaceHandlerTest.ktTesting
Automated
Manual checklist
"Scribe "is pre-typed in the active text field"Scribe "word-by-word with haptic feedback, then advances to step 2"Scribe "with haptic feedback, then shows the success screenScreenshots