Card screen cleanup: remove dead v1 path, harden gestures and small-window layout - #141
Open
simonas-dev wants to merge 1 commit into
Open
Card screen cleanup: remove dead v1 path, harden gestures and small-window layout#141simonas-dev wants to merge 1 commit into
simonas-dev wants to merge 1 commit into
Conversation
…mall-window layout - Delete superseded CardScreen/CardViewModel/GetNextQuestion and their tests (dead code path next to CardScreen2) - Card: honor pointerInputKey and drag-listener changes via rememberUpdatedState; simplify press tracking with awaitFirstDown - CardScreen2: extract user-facing strings to resources, add screen-reader state descriptions and hide visually absent cards from accessibility (hideFromAccessibility), quantize touch-driven idle timestamps using the monotonic clock, decay drag offsets concurrently with state transitions - UISizing: scale cards down to fit small windows (multi-window, foldables) preserving aspect ratio; clamp bigSpace at zero and keep the menu fully on-screen when the width constraint binds - Relocate cards on window resize by snapping to the new position instead of replaying the last state transition - QuestionComponent: sequential AtomicInteger ids instead of UUID hashCode Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TibSLSyWAedEWR41QxCByw
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
CardScreen,CardViewModel,GetNextQuestionand their tests — a superseded code path kept only as reference next toCardScreen2(no remaining references; all source sets compile).pointerInputnow keys onpointerInputKey/drag-listener presence and routes callbacks throughrememberUpdatedState, so listener changes no longer restart (or go stale in) the gesture loop; press tracking simplified withawaitFirstDown+ pressed-pointer loop.UISizing): cards scale down to fit multi-window/foldable windows preserving aspect ratio;bigSpaceis clamped at zero, and the menu is kept fully on-screen when the width constraint binds.strings.xmlhideFromAccessibility()SystemClock.elapsedRealtime), avoiding one effect-restart per motion event and immunity to wall-clock jumpsAtomicIntegerids replaceUUID.randomUUID().hashCode()(collision-free within a process).Also includes the maintenance/metro-migration commits this branch is based on (dependency bumps, Gradle 9.7.1 wrapper, Kotlin 2.4 named context parameters, detekt workaround for context-parameter files).
Test plan
:app:compileDebugKotlin,:app:compileDebugUnitTestKotlin,:app:compileDebugAndroidTestKotlinpass:app:testDebugUnitTestpasses:app:detektpasses🤖 Generated with Claude Code
https://claude.ai/code/session_01TibSLSyWAedEWR41QxCByw