Fix text-selection handle drag/visuals and onboarding page 1 vibrancy - #15
Open
Chethan616 wants to merge 1 commit into
Open
Chethan616 wants to merge 1 commit into
Chethan616 wants to merge 1 commit into
Conversation
Text selection: - The handle-drag gesture's pointerInput was keyed on selectedOcrRanges — the exact value the gesture itself mutates on every move (onSelectOcrRange inside updateRange()). The instant a drag moved past touch slop, that update fired, Compose saw the key change, and cancelled + restarted the gesture coroutine mid-drag. The restarted awaitEachGesture then waited on a fresh touch-down that never came (the same finger was still down), so a handle drag died after the first movement regardless of direction. Fixed by reading the selection via rememberUpdatedState instead of keying on it. - Replaced the symmetric "balloon on a flat neck" handle shape with the actual Android/Chrome/Google Docs construction: a circle with one sharp corner notched out exactly at the anchor point, asymmetric per side (each handle's bulge leans into the selection it bounds). Verified geometrically (numeric assertions + rendered PNG previews) before implementing in Kotlin. - The highlight band between the handles is now a fully-rounded capsule (radius = half its own height) instead of a flat rectangle with a 2-5px corner clamp, so it reads as one selection with the handles rather than two balloons stuck onto a separate bar. Onboarding page 1: - The fanned stack of format-sheets behind the assembled book sat at a permanent 0.20/0.34 fill alpha once landed (only the last-landing sheet ever fades, as the book takes over) — pale enough on the light background to read as dull/grey. Raised to 0.75 card / full-opacity lines, keeping a real contrast gap between the two so the "document lines" still read against the card instead of both washing into one flat block.
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.
Summary
pointerInputwas keyed onselectedOcrRanges, which the gesture itself mutates on every move. The instant a drag moved past touch slop, Compose saw the key change and cancelled + restarted the gesture coroutine mid-drag — the restartedawaitEachGesturethen waited on a fresh touch-down that never came since the same finger was still pressed. Fixed by reading the live selection viarememberUpdatedStateinstead of keying on it.Test plan