Commit f3c9eb8
Move voice chat into bottom-row buttons (#8687)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1214157224317277/task/1214927873875120
### Description
Fixes the position and styling of the voice chat control in the unified
input, and unblocks voice search on the Duck.ai tab now that the two
controls no longer share a slot.
What changed:
- **Voice chat moves to the card's bottom row.** `voiceHostButtons()`
returns `submitButtons` unconditionally, so voice chat lives in the
input card's bottom row (`inputScreenButtonsContainer`) in both top-bar
and bottom-bar modes. The floating bottom-right row inflates a new
dedicated layout (`view_native_input_screen_floating_buttons.xml`) that
omits `actionVoiceChat` entirely — the button is physically removed from
the floating container, not just hidden. `actionVoiceChat` in
`InputScreenButtons` is now `ImageView?` so layouts that omit it run
without an NPE.
- **Voice-chat click works in bottom-bar mode.** `submitButtons`
re-reads `this@NativeInputModeWidget.onVoiceChatClick` at construction.
Previously the widget setter forwarded the handler before
`submitButtons` was created (during attach), leaving the click silently
dead in bottom-bar mode. `floatingButtons` was already wired this way,
which is why top-bar voice chat worked.
- **Voice-chat chip uses the neutral grey background.**
`daxColorControlFillPrimary` instead of `daxColorAccentAltPrimary`, with
`daxColorPrimaryIcon` for the icon tint.
- **Voice search now visible on the Duck.ai tab.** Voice search used to
be suppressed whenever voice-chat-entry was enabled, because both lived
in the same floating row. With voice search in the input field and voice
chat in the bottom row, they can coexist. Voice search on Duck.ai is now
gated only by its own `showVoiceSearchToggle` flag.
Out of scope (deferred from the Asana task):
- _AV5 / voice mode in chat on Android_: open design question, not a
code-only change.
### Steps to test this PR
_Voice chat — top-bar (NTP / standard omnibar)_
- [x] Open a new tab and tap the omnibar to focus the unified input
- [x] Switch to the Duck.ai tab with the prompt empty — voice chat icon
appears in the input card's bottom row (next to model picker, etc.), NOT
as a floating button bottom-right
- [x] Tap the voice chat icon — voice chat launches
- [x] Carriage return: type something in chat mode (browser context) —
newline button still floats bottom-right; voice chat is hidden
- [x] Clear the text — voice chat reappears in the bottom row
_Voice chat — bottom-bar_
- [x] Switch the address bar position to bottom in Settings
- [x] Focus the input, switch to Duck.ai tab with empty prompt — voice
chat icon still appears in the bottom row (no visual regression)
- [x] Tap the voice chat icon — voice chat launches (previously this
click was a no-op due to the wiring bug fixed in this PR)
_Voice chat — color_
- [x] On the Duck.ai tab with an empty prompt, the voice chat chip
renders with the neutral grey `daxColorControlFillPrimary` background —
not the previous blue
- [x] Switch between light and dark theme — the chip remains a subtle
neutral fill in both modes (light: faint dark overlay; dark: faint light
overlay)
_Voice search visibility — Duck.ai tab_
- [ ] On the Duck.ai tab with an empty prompt and the
`showVoiceSearchToggle` flag enabled — the microphone (voice search)
icon appears inside the input field, alongside the voice chat chip in
the bottom row
- [ ] Disable `showVoiceSearchToggle` — microphone is hidden on Duck.ai
tab (voice chat still shown)
- [ ] Confirm Search tab is unchanged — microphone still shown when
blank
_Regression_
- [ ] Voice search (microphone) still appears inside the input field in
Search mode, unchanged
- [x] Send / stop button behavior in chat mode unchanged
- [ ] On an active Duck.ai page (chat URL), only the voice search
microphone is offered (voice chat suppressed, as before)
### UI changes
| Before | After |
| ------ | ----- |
|(Upload before screenshot)|(Upload after screenshot)|
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Touches unified omnibar/Duck.ai input UX, IME behavior, and click
wiring across top/bottom layouts; logic is covered by new tests but
manual QA on tab/position combos matters.
>
> **Overview**
> Relocates **voice chat** to the unified input card’s **bottom row** in
both top- and bottom-omnibar modes, while the floating corner row now
only hosts **newline** and **send** via a dedicated layout—voice
controls are no longer competing for the same slot.
>
> **Voice search** can show on the Duck.ai tab alongside voice chat:
availability is centralized in `computeVoiceButtonAvailability` (with
unit tests), dropping the old rule that hid voice search when voice-chat
entry was enabled. The voice-chat chip uses neutral fill/icon tokens;
bottom-bar voice-chat clicks are wired when `submitButtons` is built.
>
> Tab switches refresh send/newline visibility; bottom-bar Duck.ai chat
mode gets multiline IME enter behavior and corrected hardware-enter
submit rules when position/state updates.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f3c2583. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: David Gonzalez <malmstein@Davids-MacBook-Pro.local>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6cd4ec5 commit f3c9eb8
6 files changed
Lines changed: 261 additions & 40 deletions
File tree
- app/src
- main/java/com/duckduckgo/app/browser/nativeinput
- test/java/com/duckduckgo/app/browser/nativeinput
- duckchat/duckchat-impl/src/main
- java/com/duckduckgo/duckchat/impl
- inputscreen/ui/view
- ui/nativeinput/views
- res/layout
Lines changed: 45 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
582 | | - | |
583 | | - | |
584 | | - | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
591 | 585 | | |
592 | 586 | | |
593 | 587 | | |
| |||
806 | 800 | | |
807 | 801 | | |
808 | 802 | | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
Lines changed: 117 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
Lines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
| 167 | + | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
| 171 | + | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
Lines changed: 35 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
529 | 532 | | |
530 | 533 | | |
531 | 534 | | |
532 | 535 | | |
533 | | - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
534 | 540 | | |
535 | 541 | | |
536 | 542 | | |
| |||
541 | 547 | | |
542 | 548 | | |
543 | 549 | | |
544 | | - | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
545 | 554 | | |
546 | 555 | | |
547 | 556 | | |
| |||
627 | 636 | | |
628 | 637 | | |
629 | 638 | | |
| 639 | + | |
630 | 640 | | |
631 | 641 | | |
632 | 642 | | |
633 | 643 | | |
634 | 644 | | |
635 | 645 | | |
| 646 | + | |
636 | 647 | | |
637 | 648 | | |
638 | 649 | | |
639 | 650 | | |
640 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
641 | 661 | | |
642 | 662 | | |
643 | 663 | | |
| |||
655 | 675 | | |
656 | 676 | | |
657 | 677 | | |
658 | | - | |
659 | | - | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
660 | 686 | | |
661 | 687 | | |
662 | 688 | | |
663 | 689 | | |
664 | | - | |
| 690 | + | |
665 | 691 | | |
666 | 692 | | |
667 | 693 | | |
668 | 694 | | |
669 | 695 | | |
670 | | - | |
| 696 | + | |
671 | 697 | | |
672 | 698 | | |
673 | 699 | | |
| |||
1152 | 1178 | | |
1153 | 1179 | | |
1154 | 1180 | | |
| 1181 | + | |
1155 | 1182 | | |
1156 | 1183 | | |
1157 | 1184 | | |
| |||
1164 | 1191 | | |
1165 | 1192 | | |
1166 | 1193 | | |
1167 | | - | |
| 1194 | + | |
1168 | 1195 | | |
1169 | 1196 | | |
1170 | | - | |
1171 | | - | |
1172 | 1197 | | |
1173 | 1198 | | |
1174 | 1199 | | |
| |||
1178 | 1203 | | |
1179 | 1204 | | |
1180 | 1205 | | |
1181 | | - | |
| 1206 | + | |
1182 | 1207 | | |
1183 | 1208 | | |
1184 | 1209 | | |
| |||
0 commit comments