Replace DropdownMenu with inline Card for address predictions - #13699
Merged
nidhi-stripe merged 6 commits intoAug 3, 2026
Conversation
cttsai-stripe
left a comment
Contributor
There was a problem hiding this comment.
Looks like we have some behavior changes along side with the swapping of the UI component. If they are needed, consider extracting them as a separate PR.
3 tasks
Committed-By-Agent: claude
…ction When a user taps a prediction, the text field loses focus (since clickable elements are focusable in Compose), which triggered onDismissed() and cancelled the selectionJob before fetchPlace could return. Now onDismissed skips cancellation when a selection is actively in progress. Committed-By-Agent: claude
Keep the UI component swap (DropdownMenu → Card, Box → Column) with identical content and behavior inside. Controller logic, focus dismissal, loading optimization, and layout reorg will follow in a separate PR. Committed-By-Agent: claude
Committed-By-Agent: claude
nidhi-stripe
force-pushed
the
nidhig/address-inline-autocomplete-dropdown-ui-fix
branch
from
August 3, 2026 18:27
294b956 to
5e075fe
Compare
Committed-By-Agent: claude
Comment on lines
147
to
+148
| currentCoroutineContext().ensureActive() | ||
| if (_inlinePredictionsState.value == AutocompleteAddressInteractor.InlinePredictionsState.Idle) return |
Contributor
There was a problem hiding this comment.
iirc, we call ensureActive() somewhere else. Should we combine these two check and make it a helper? Ignore this comment if that is not true.
Collaborator
Author
There was a problem hiding this comment.
I think they serve different purposes, one checks selectionJob cancellation (no Idle guard needed), line 147 checks collectLatest cancellation + the Idle-state race guard so they can't be merged
nidhi-stripe
enabled auto-merge (squash)
August 3, 2026 19:19
Committed-By-Agent: claude
cttsai-stripe
approved these changes
Aug 3, 2026
nidhi-stripe
deleted the
nidhig/address-inline-autocomplete-dropdown-ui-fix
branch
August 3, 2026 20:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Replace the floating DropdownMenu popup with an inline Card component for address autocomplete predictions
Motivation
The DropdownMenu (popup) approach had positioning and sizing issues, it required manual width tracking via onSizeChanged and used popupProperties(focusable = false) to avoid stealing focus. It would overlap with the keyboard.
An inline Card rendered directly below the text field in a Column is simpler, more predictable, and avoids popup layering/clipping problems.
Testing
Changelog