Skip to content

feat(transfer): AddressInput 聚焦自动展开联系人建议 - #94

Merged
Gaubee merged 1 commit into
mainfrom
feat/address-input-contact-picker
Dec 23, 2025
Merged

Gaubee merged 1 commit into
mainfrom
feat/address-input-contact-picker

Conversation

@Gaubee

@Gaubee Gaubee commented Dec 23, 2025

Copy link
Copy Markdown
Contributor

Summary

This PR enhances the AddressInput component with focus-triggered contact suggestions and adds a ContactPickerJob for browsing all contacts.

Changes

AddressInput Enhancements

  • Focus to show all: Suggestions dropdown opens on focus, even without input
  • Empty query support: suggestContacts now returns all contacts when query is empty
  • Chain type filtering: Filters suggestions by selected chain type
  • View all contacts button: Opens ContactPickerJob for complete contact browsing
  • New props: onContactPicker, maxSuggestions

New ContactPickerJob

  • Full-screen contact picker sheet
  • Search and filter contacts
  • Multi-address contact expansion
  • Chain type filtering
  • Returns selected address via custom event

White Book Update

  • Updated docs/white-book/04-服务篇/09-联系人服务/ with new interaction flow
  • Added ContactPickerActivity documentation

i18n

  • Added contact.noContacts, contact.viewAll, contact.selectContact, contact.selectAddress for all locales

Tests

  • Added 3 new tests for suggestContacts:
    • Empty query returns all contacts
    • Chain type filtering
    • Limit parameter

Screenshots

Focus to show suggestions

┌──────────────────────────────────────────────┐
│ [输入地址...]                    [扫描] [粘贴] │
├──────────────────────────────────────────────┤
│ 👤 Alice                                      │
│    b7ADmv... (BFMeta)                        │
├──────────────────────────────────────────────┤
│ 👤 Bob                                        │
│    0x742d... (Ethereum)                       │
├──────────────────────────────────────────────┤
│ [👥 查看全部联系人...]                         │
└──────────────────────────────────────────────┘

Test Results

  • ✅ TypeCheck passed
  • ✅ 1385 unit tests passed (3 new tests added)

Closes #93

@Gaubee
Gaubee force-pushed the feat/address-input-contact-picker branch from 73bd904 to 135d635 Compare December 23, 2025 10:09
- 修改 suggestContacts 支持空查询,返回所有联系人
- AddressInput 聚焦时自动展开建议面板
- 添加查看全部联系人按钮,跳转到 ContactPickerJob
- 创建 ContactPickerJob 联系人选择器
- 支持按链类型过滤联系人
- 更新白皮书和 i18n

Closes #93
@Gaubee
Gaubee force-pushed the feat/address-input-contact-picker branch from 135d635 to 050d921 Compare December 23, 2025 10:10
@Gaubee
Gaubee merged commit c183564 into main Dec 23, 2025
5 checks passed
@Gaubee
Gaubee deleted the feat/address-input-contact-picker branch December 23, 2025 10:11
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.

feat(transfer): AddressInput 聚焦自动展开联系人建议

1 participant