-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Logo animation on Input Screen #6821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...kchat-impl/src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/view/InputModeWidget.kt
Show resolved
Hide resolved
LukasPaczos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One questions above and I also found a minor issue:
- Open Input Screen.
- Go to Duck.ai tab.
- Type some text.
- Manually scroll to search tab.
- Delete the text.
- Expected to see the regular logo but the AI logo is shown instead.
Screen_recording_20250922_103208.mp4
.../src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/viewmodel/InputScreenViewModel.kt
Outdated
Show resolved
Hide resolved
|
@joshliebe I still see a similar issue but now when text is cleared in Duck.ai mode.
Screen_recording_20250922_124756.mp4Another minor issue where the transition is a little jumbled. Adding a slowed-down recording below, but it's easily noticeable with a physical device.
Screen_recording_20250922_125806_slow3x.mp4 |
LukasPaczos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates!
I found one more edge case where the transition doesn't look great:
Screen_recording_20250922_165339_slow3x.mp4
That said, in search mode, the regular logo appears when the input has empty lines, while in chat mode the AI logo doesn’t. Since this also happens on develop, I wouldn’t treat it as a blocker, as the issue should resolve independently.
I dropped some additional comments below that'd be great to address, from the testing standpoint all LGTM!
...ckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/InputScreenFragment.kt
Outdated
Show resolved
Hide resolved
...ckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/InputScreenFragment.kt
Outdated
Show resolved
Hide resolved
...ckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/InputScreenFragment.kt
Outdated
Show resolved
Hide resolved
This is an existing issue, it shouldn’t show the logo when expanding with new line. Will address separately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements logo animation functionality for the Input Screen, adding smooth transitions between search and Duck.ai modes when users interact with tabs.
Key Changes
- Replaced static logo with animated Lottie view that transitions between "DuckDuckGo" and "Duck.ai" states
- Added scroll-based animation progress calculation with easing functions for smooth transitions
- Implemented tab tap detection to trigger targeted logo animations with different behavior than scroll animations
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| InputScreenViewModelTest.kt | Added comprehensive test coverage for logo animation logic including scroll calculations and tap behavior |
| styles.xml | Changed tab indicator animation from "elastic" to "linear" for consistent animation timing |
| duckduckgo_ai_transition_light.json | Added light theme Lottie animation file for logo transitions |
| duckduckgo_ai_transition_dark.json | Added dark theme Lottie animation file for logo transitions |
| fragment_input_screen.xml | Replaced ImageView with LottieAnimationView wrapped in FrameLayout for animation support |
| InputScreenViewModel.kt | Implemented core animation logic with scroll tracking, progress calculations, and command emission |
| InputModeWidget.kt | Added tab click detection and scroll position synchronization functionality |
| Command.kt | Added new command types for logo progress setting and animation triggering |
| InputScreenFragment.kt | Integrated Lottie animation handling, command processing, and lifecycle management |
| build.gradle | Added AndroidX archCore testing dependency for LiveData testing support |
...impl/src/test/kotlin/com/duckduckgo/duckchat/impl/ui/inputscreen/InputScreenViewModelTest.kt
Show resolved
Hide resolved
...impl/src/test/kotlin/com/duckduckgo/duckchat/impl/ui/inputscreen/InputScreenViewModelTest.kt
Show resolved
Hide resolved
.../src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/viewmodel/InputScreenViewModel.kt
Show resolved
Hide resolved
LukasPaczos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and works as expected, thanks for addressing the comments!
| private val voiceServiceAvailable = MutableStateFlow(voiceSearchAvailability.isVoiceSearchAvailable) | ||
| private val voiceInputAllowed = MutableStateFlow(true) | ||
| private var userSelectedMode: UserSelectedMode = NONE | ||
| private var currentPagePosition: Int = 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have the userSelectedMode field, could that be re-used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to think about this a little, will fix in a follow-up.

Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1210978319570196?focus=true
Description
Steps to test this PR
Empty state
Favorites
UI changes
before.mp4
after.mp4