Contact mail results: close them and go back (#370 follow-up)#375
Merged
Conversation
The results view was a dead end: the only way out was picking a folder in the tree, and it did not behave like the app's other searches. Escape now closes the results and returns to the folder the search started from (All Mail if there wasn't one), announcing the destination and its count. A Close button sits next to the match count above the results, and the action is in the command palette as "Close Contact Mail Results". Escape keeps its existing meanings: an open reading pane, the calendar, and tab mode all claim it earlier in OnWindowKeyDown, and the command is unavailable while the search box has focus so Escape there still clears the text search first. Searching again from inside a results view keeps the original folder as the return target, so one Escape always lands back in real mail rather than in the previous search. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Follow-up to #370, reported by Kelly: after searching for a contact's mail there was no way back — the results view had to be left by picking a folder in the tree, and it did not behave like the app's other searches.
What changed
Escape stays two-stage where it already had meaning: an open reading pane, the calendar, and tab mode all claim Escape earlier in
OnWindowKeyDown, and the command is unavailable while the search box has focus so Escape there still clears the text search first.Searching again from inside a results view keeps the original folder as the return target, so one Escape always lands back in real mail rather than in the previous search.
Tests
Four added to
ContactMailSearchTests(27 total in the file): the view reports itself as contact-mail, closing returns to the starting folder and reloads it, a second search does not move the return target, and closing outside the results view is a no-op. Full suite: 1603 passed.Docs
User guide (Address Book section + main-window shortcut table), release notes for 0.8.37, and the
Escaperow indocs/KEYBOARD-SHORTCUTS.md.