cove icon indicating copy to clipboard operation
cove copied to clipboard

Align motion across mobile flows

Open praveenperera opened this issue 5 months ago • 2 comments

Summary

  • Align Android onboarding restore error and progress motion with iOS.
  • Align swipe-to-send idle arrow and sending dots across iOS and Android.
  • Keep Android navigation on its Material shared-axis transitions so app-level routing remains platform-idiomatic.

How to test

  • ./gradlew :app:compileDevDebugKotlin
  • ./gradlew ktlintCheck
  • swiftformat --lint ios/Cove/Flows/SendFlow/ConfirmScreen/SwipeToSendView.swift --swiftversion 6
  • just build-ios
  • xcodebuild -scheme Cove -sdk iphonesimulator -arch arm64 -derivedDataPath /tmp/cove-ios-derived build

praveenperera avatar Jun 12 '26 19:06 praveenperera

[!IMPORTANT]

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c5ec69e2-aeb7-4ac7-a0ae-51a105158795

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • [ ] ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Commit unit tests in branch fix-motion-parity

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Jun 12 '26 19:06 coderabbitai[bot]

Greptile Summary

This PR aligns animation motion across iOS and Android for the onboarding restore flow and the swipe-to-send confirmation screen. All four changed files are animation-only — no business logic, network calls, or data handling is touched.

  • Android onboarding (OnboardingPromptViews.kt): wraps the restore error card in AnimatedVisibility with a slide+fade in/out; a previousErrorMessage hold-over ensures the card's text is visible during the exit animation. OnboardingTheme.kt adds a 250ms animateFloatAsState tween to the thin progress bar fill.
  • Android send flow (SendFlowConfirmScreen.kt): replaces the three-dot alpha-fade with a scale-and-lift bounce (scale 0.5→1.0, 6dp lift), widening dot spacing from 4dp to 8dp.
  • iOS send flow (SwipeToSendView.swift): extracts the static arrow into PulsingSendArrow, which drives a cosine-eased opacity pulse (1.0→0.6→1.0, 1.8s period) via TimelineView only when the button is at rest and not dragging.

Confidence Score: 5/5

Safe to merge — changes are scoped entirely to animation and visual presentation with no mutations to business logic or state beyond animation-local variables.

Every changed file touches only rendering and animation code. The previousErrorMessage pattern is logically sound: LaunchedEffect updates it whenever a non-null error arrives, so visibleErrorMessage always holds the last error string during the exit animation. The cosine-eased opacity math in PulsingSendArrow is correct across all boundary values. No data paths, persistence, or network calls are affected.

No files require special attention.

Important Files Changed

Filename Overview
android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingPromptViews.kt Adds AnimatedVisibility (slide+fade in/out) for the error card, with a previousErrorMessage hold-over pattern that correctly preserves the last error text during the exit animation.
android/app/src/main/java/org/bitcoinppl/cove/flows/OnboardingFlow/OnboardingTheme.kt Wraps the raw progress value in animateFloatAsState(250ms tween) to give the thin progress bar a smooth animated fill; logic is correct.
android/app/src/main/java/org/bitcoinppl/cove/flows/SendFlow/SendFlowConfirmScreen.kt Replaces the alpha-fade dots with a scale+vertical-lift bounce animation; timing and math are correct, dot gap widened from 4dp to 8dp.
ios/Cove/Flows/SendFlow/ConfirmScreen/SwipeToSendView.swift Extracts the static arrow into PulsingSendArrow, which drives a cosine-eased opacity pulse (1.0→0.6→1.0, 1.8s period) via TimelineView when the button is at rest; math and guard clauses are correct.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph iOS_PulsingSendArrow["iOS: PulsingSendArrow"]
        A([isPulsing = false]) -->|drag released, offset=0| B([isPulsing = true])
        B -->|onChange fires| C[pulseStartedAt = now]
        C --> D[TimelineView fires each frame]
        D --> E[opacity = 1 - 0.4 x easedProgress]
        E --> D
        B -->|drag starts| A
        A --> F[opacity = 1.0 guard returns early]
    end

    subgraph Android_Error["Android: AnimatedVisibility Error Card"]
        G([errorMessage = null]) -->|error arrives| H([errorMessage != null])
        H --> I[visible=true, slide+fade IN 300ms]
        I --> J[LaunchedEffect: previousErrorMessage = errorMessage]
        H -->|error cleared| K([errorMessage = null])
        K --> L[visible=false, slide+fade OUT 300ms, content = previousErrorMessage]
        L --> G
    end

    subgraph Android_Dots["Android: ThreeDots bounce"]
        M[progress 0 to 1 tween 500ms RepeatMode.Reverse] --> N[scale = 0.5 + progress x 0.5]
        N --> O[translationY = -6dp x progress]
        O --> M
    end
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    subgraph iOS_PulsingSendArrow["iOS: PulsingSendArrow"]
        A([isPulsing = false]) -->|drag released, offset=0| B([isPulsing = true])
        B -->|onChange fires| C[pulseStartedAt = now]
        C --> D[TimelineView fires each frame]
        D --> E[opacity = 1 - 0.4 x easedProgress]
        E --> D
        B -->|drag starts| A
        A --> F[opacity = 1.0 guard returns early]
    end

    subgraph Android_Error["Android: AnimatedVisibility Error Card"]
        G([errorMessage = null]) -->|error arrives| H([errorMessage != null])
        H --> I[visible=true, slide+fade IN 300ms]
        I --> J[LaunchedEffect: previousErrorMessage = errorMessage]
        H -->|error cleared| K([errorMessage = null])
        K --> L[visible=false, slide+fade OUT 300ms, content = previousErrorMessage]
        L --> G
    end

    subgraph Android_Dots["Android: ThreeDots bounce"]
        M[progress 0 to 1 tween 500ms RepeatMode.Reverse] --> N[scale = 0.5 + progress x 0.5]
        N --> O[translationY = -6dp x progress]
        O --> M
    end

Reviews (2): Last reviewed commit: "Smooth mobile animation transitions" | Re-trigger Greptile

greptile-apps avatar Jun 12 '26 20:06 greptile-apps