Repository navigation
fix: show the X in the mail search field once it has focus, and let it close the search #127 - #136
Merged
Merged
Conversation
wmcparla
marked this pull request as ready for review
November 13, 2026 20:41
|
The One thing to consider: on an empty, focused field the X now closes the search, but it keeps the label from Bulwark Warden is an AI assistant and can be wrong. It answers from the docs, the code and earlier issues, and links its sources. |
Member
|
Thanks, merged. I loosened the label check in the test a bit; it failed on a checkout with CRLF line endings. |
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
#127: tapping the mail list's search field opens a panel ("Search everything", recent searches) over the list, and the only control to leave it was the X in the field, which showed only once something was typed and only cleared the text. On Android the back button closes it, but iOS has none, so an empty, focused field could only be left by tapping elsewhere. This shows the X as soon as the field has focus: with text in it, it clears the text and keeps the keyboard up, as before; on an empty field it closes the field, the keyboard and the panel.
Changes
EmailListScreen.tsx: the X shows while the field has focus as well as while it holds text, and callsclearOrCloseSearch, which clears typed text, or on an empty field drops the focus state and blurs the input. Its accessibility label follows what it does: "Clear search" with text, "Close" (common.close) on an empty field (Warden's point below).search-close-wiring.test.ts: checks that wiring, the label included.Related issues
Closes #127
Type of change
Checklist
npm run typecheckand there are no errors (native has nolintscript)npm run buildin native; an x86_64 release APK,assembleGithubRelease -PallowDebugSignedRelease=true, builds and runs)locales/) if my changes affect user-facing text (no new text: the labels are the existingcontacts.clear_searchandcommon.close, both in every locale;npm run i18n:checkpasses)Tests:
npx vitest run: 7105 passed, 163 skipped (the live Stalwart suites), 0 failed.Tested by hand on the Android 16 emulator (1080x2424, 420 dpi), upstream b3b4230 against this branch, never pressing Android's back (to stand in for iOS), reading the view hierarchy and the keyboard state after each step:
Not tested: iOS itself, a tablet (the header search bar goes through the same
renderSearchBar).Screenshots / demo
Notes for reviewers
clearSearchAndFilters). The filters keep their own chips.UnifiedInboxScreen) has no panel under its field, so it has no such trap and is left as it is.🤖 Generated with Claude Code