Repository navigation
Redesign check video page as a side-by-side comparison - #51
Merged
Merged
Conversation
Show the newly recorded video next to the existing one for that day so the user can pick which to keep, instead of only reviewing the new recording. Tapping either video keeps it and discards the other; retake discards the new video and returns to recording; close keeps the existing video. Each video has its own mute toggle and both pause together on press-and-hold. Side-by-side simultaneous playback needed a second ExoPlayer instance alongside the app's single shared player, so VideoPlayerExo's playback/sync logic is factored out and reused by a new dedicated-player variant. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYC2q5uA9JHmk6TNaeZe9X
|
Playing two videos side by side needs two dedicated ExoPlayer instances, on top of the single app-wide shared player still holding the calendar's last video - three concurrent decoders was enough to exhaust the default 256MB heap on some devices. Stop the shared player while this page is active; it's fully reconfigured when the calendar is next shown anyway. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYC2q5uA9JHmk6TNaeZe9X
…pages The video comparison row was sized to its actual (half-height, since two videos share the width) content instead of the standard aspect-ratio-driven slot, so the remaining space handed to the bottom bar was much larger than on every other video page. Render the two videos inside VideoToolbarLayout like every other screen, centered in that same fixed-height slot, so the bottom bar - and its buttons - are back to the usual size. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYC2q5uA9JHmk6TNaeZe9X
… big retake Replace tap-to-select and the labels above each video with a dedicated "CHOOSE" button under each one naming it (EXISTING/NEW); selecting a video is now only ever this explicit action. Mute becomes a plain flat icon (matching the record page's bottom bar) directly under each video, and unmuting one video forcibly mutes the other, since only one should be audible at a time. Retake is now a full-width prominent button instead of a small icon. Also remove the close icon button: backing out of the page now keeps the existing video (the same outcome the close button gave) and returns straight to the calendar, rather than the default back behaviour of returning to the record page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYC2q5uA9JHmk6TNaeZe9X
Reusing VideoToolbarLayout reserved the same fixed video-slot height as a single full-width video, leaving only that page's usual slim bottom bar allowance - nowhere near enough room for a mute icon, two-line choose button and big retake button per side, so most of it was clipped or invisible on device. Size the video row to its actual (half-height, since two videos share the width) content instead, and hand the freed-up space to the controls below. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYC2q5uA9JHmk6TNaeZe9X
Tighten the gap between each video and its mute button (they now sit right underneath), while keeping a deliberate 30dp gap before the choose button below it. Give the top prompt more breathing room from the status bar and the videos below it. Lowercase and shrink the "Choose" caption so "EXISTING"/"NEW" reads as the primary label, and make the choose/retake buttons more prominent with a stronger glass fill; the retake button also gains its icon, via a new optional icon slot on GlassButton. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LYC2q5uA9JHmk6TNaeZe9X
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
Redesigns the check video page (shown after recording a new video for a day that already has one) so the user can compare both videos before deciding what to keep, instead of only reviewing the new recording:
Implementation notes
VideosDaogainsdiscardMediaStoreVideo(uri)to delete a freshly recorded (and not kept) video from MediaStore.CheckVideoViewModelnow exposes bothexistingVideoandnewVideo, withkeepNewVideo()/discardNewVideo()replacing the old singleacceptVideo().ExoPlayerinstance, since the app normally shares a single player app-wide.VideoPlayerExo's playback/sync logic was factored into a shared internal composable, reused by a newVideoPlayerExoStandalone(backed by a dedicated, per-composable player viarememberStandaloneExoPlayer).VideoPlayergained ausesDedicatedPlayerflag to opt into this; all existing call sites are unaffected (defaultfalse).CheckVideoTilecomponent (ui/feature/record/check/component/) renders one video's label + player + tap/press gestures.Test plan
./gradlew :app:compileDebugKotlin./gradlew :app:assembleDebug🤖 Generated with Claude Code
https://claude.ai/code/session_01LYC2q5uA9JHmk6TNaeZe9X
Generated by Claude Code