Keep single line for empty Search Input in bottom bar when Voice enabled #2214
+130
−23
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.
Task/Issue URL: https://app.asana.com/1/137249556945/project/1206226850447395/task/1211559392963008?focus=true
Tech Design URL:
CC:
Description
Show microphone button in input field on empty state so the height is consistent regardless of private voice search setting. Only for bottom bar setting.
Testing Steps
Impact and Risks
Medium: Could disrupt specific features or user flows
What could go wrong?
Quality Considerations
Notes to Reviewer
Internal references:
Definition of Done | Engineering Expectations | Tech Design Template
Note
Displays a voice button inside the input when bottom bar is empty and manages button visibility via SwitchBarHandler with new publishers and UI wiring, plus tests.
NavigationActionBarViewModel.shouldShowMicButton
: mic shown without text only for top bar; for bottom bar mic moves inside input; simplified logic.SwitchBarTextEntryView
: uses handler-drivenbuttonState
; adds voice button tap ->microphoneButtonTapped()
; adjusts text inset for any button.SwitchBarButtonsView
: addsvoiceOnly
state, voice button UI, accessibility, andshowsAnyButton
handling.SwitchBarHandling
/SwitchBarHandler
:buttonState
,isTopBarPosition
,currentButtonStatePublisher
, andupdateBarPosition(isTop:)
.updateButtonState
determines.clearOnly
(has text),.voiceOnly
(empty + voice enabled + bottom bar), or.noButtons
.OmniBarEditingStateViewController
: updates bar position on orientation/position changes to drive button state; installs action bar in text entry view for bottom position.SwitchBarHandlerTests
: add cases validating voice button visibility across top/bottom, with/without text, and when disabled.Written by Cursor Bugbot for commit 5baf32f. This will update automatically on new commits. Configure here.