Skip to content

Address book: first-letter (type-ahead) navigation in the contact and group lists (#371)#372

Merged
kellylford merged 1 commit into
mainfrom
fix/371-address-book-type-ahead
Jul 26, 2026
Merged

Address book: first-letter (type-ahead) navigation in the contact and group lists (#371)#372
kellylford merged 1 commit into
mainfrom
fix/371-address-book-type-ahead

Conversation

@kellylford

Copy link
Copy Markdown
Owner

Fixes #371.

The bug

With focus on the address book's contact list, typing a letter did nothing. The list renders each row through an ItemTemplate whose root is a Grid, so WPF's TextSearch had no text to match — and with no TextSearch.TextPath declared, type-ahead was silently a no-op.

The fix

  • ContactList, GroupsList, and GroupMembersList now declare IsTextSearchEnabled="True" plus a TextSearch.TextPath.
  • Contacts match on a new ContactModel.TypeAheadText: the display name, falling back to the email address for prior-recipient contacts stored without a name. A TextPath binds to exactly one property, so that fallback has to live on the model. Groups match on Name.

WPF's built-in behavior then gives what the issue asks for: letters accumulate within the system type-ahead timeout ("br" lands on Brenda, not Bob), and repeating the same letter cycles through the contacts starting with it.

Tests

QuickMail.Tests/AddressBookTypeAheadTests.cs raises real TextInput events through the WPF input pipeline (not just asserting the XAML attribute), covering:

  • first letter selects the matching contact
  • repeating a letter cycles to the next match
  • multiple letters match a longer prefix
  • a contact with no name is reachable by its address
  • the groups list matches on group name

All 6 pass locally; full suite run as well.

Notes

  • Docs: user guide gets a "Jumping to a Contact by Typing" subsection; release notes entry added to docs/release-notes-v0.8.37.md (new file — this work ships in 0.8.37).
  • Out of scope: the standalone Group Manager dialog (Manage… / Ctrl+Shift+M) has its own lists that were not touched here. Worth a follow-up if the same typing behavior is wanted there.

…er lists (#371)

Typing a letter with focus on the address book's contact list did nothing.
The list uses an ItemTemplate whose root is a Grid, so WPF's TextSearch had
no text to match against and type-ahead silently did nothing.

Declare IsTextSearchEnabled + TextSearch.TextPath on the contact list, the
groups list, and the group-members list. Contacts match on a new
TypeAheadText property: the display name, falling back to the address for
prior-recipient contacts stored without a name (a TextPath binds to exactly
one property, so the fallback has to live on the model). Groups match on
their name.

This restores the standard Windows list behavior the user expects: letters
accumulate within the type-ahead timeout to match a longer prefix, and a
repeated letter cycles through the contacts starting with it.

Tests drive real TextInput events through the WPF input pipeline and cover
first-letter, repeat-letter cycling, multi-letter prefix, the name-less
contact fallback, and the groups list.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kellylford
kellylford merged commit 4602b16 into main Jul 26, 2026
4 checks passed
@kellylford
kellylford deleted the fix/371-address-book-type-ahead branch July 26, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

First letter/type ahead nav does not work in the address book

1 participant