-
Notifications
You must be signed in to change notification settings - Fork 989
Maintain multi-line content when switching between search and Duck.ai #6219
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
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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
The PR ensures that multi-line content is preserved when switching between the search and Duck.ai tabs, adds a clear-text button, and improves layout animations and transitions.
- Switches the omnibar’s EditText to a custom
SearchInterstitialEditText
to handle multi-line input and Enter submission. - Adds a clear-text ImageView with animated layout changes in the omnibar layout.
- Hooks up transition duration constant in the interstitial activity and tweaks animation timing in the omnibar.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
File | Description |
---|---|
view_duck_chat_omnibar.xml | Enabled animateLayoutChanges , swapped in custom EditText, and added clear-text button. |
SearchInterstitialEditText.kt | Introduced custom EditText that intercepts Enter for submission. |
SearchInterstitialActivity.kt | Applied a shared‐element transition duration constant (200ms). |
DuckChatOmnibarLayout.kt | Wired up clear button, updated input behavior for multi-line, adjusted animation duration and max lines. |
Comments suppressed due to low confidence (1)
duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/DuckChatOmnibarLayout.kt:150
- The new clear-text visibility behavior and multi-line retention logic need unit or UI tests to ensure they work as expected when switching tabs, entering text, and tapping the clear button.
duckChatClearText.isVisible = !s.isNullOrEmpty()
duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/DuckChatOmnibarLayout.kt
Show resolved
Hide resolved
duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/DuckChatOmnibarLayout.kt
Show resolved
Hide resolved
bfb834a
to
4647bf7
Compare
4647bf7
to
b054043
Compare
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
Added few nit comments and also tested copy/pasting text that already contains line breaks in the search mode to ensure it doesn't trigger the search
duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/SubmitOnEnterEditText.kt
Outdated
Show resolved
Hide resolved
duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/ui/SubmitOnEnterEditText.kt
Outdated
Show resolved
Hide resolved
ac439a1
to
98f29e4
Compare
98f29e4
to
af48b25
Compare
Task/Issue URL: https://app.asana.com/1/137249556945/project/488551667048375/task/1210498774626389?focus=true
Description
Steps to test this PR