-
Notifications
You must be signed in to change notification settings - Fork 407
dms: Add filter search box to Direct Messages page #2094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Implements issue zulip#2078, a follow-up to zulip#1406. The Figma design for the Subscribed Channels page includes a 'Filter channels' search box at the top. This feature allows users to quickly find channels by typing a search query. The search filtering is: - Real-time (updates as the user types) - Case-insensitive - Partial match (searches within channel names) - Works for both pinned and unpinned channels The implementation includes: - TextField widget with search icon at the top of the channels list - TextEditingController and state management for search query - Filtering logic in _filterSubscription helper method - Styling that matches the Figma design specifications - New localization string 'channelsPageFilterPlaceholder' - Proper handling of empty search results (doesn't show the 'not subscribed' placeholder when filter returns no matches) - 8 new comprehensive test cases covering various filter scenarios All existing tests continue to pass (28/28 tests passing). Fixes: zulip#2078
Extends the channel filtering feature to the 'All Channels' page and
refactors the search component for reusability.
Changes:
* Create reusable 'SearchBox' widget in 'lib/widgets/search.dart'
* Refactor 'subscription_list.dart' to use the shared 'SearchBox'
* Implement filtered search in 'all_channels.dart':
* Add 'TextEditingController' for search state
* Filter the list of streams based on search query
* Updates real-time, case-insensitive
* Add 14 new tests in 'all_channels_test.dart'
* Verify existing 'subscription_list_test.dart' passes (no regressions)
The search behavior matches the Subscribed Channels page: real-time,
case-insensitive filtering by channel name.
Test Plan:
* 'flutter test test/widgets/all_channels_test.dart' (New tests)
* 'flutter test test/widgets/subscription_list_test.dart' (Regression)
* All 42 tests passed.
Fixes: zulip#2078
* Remove duplicate import in 'all_channels.dart' * Remove invalid '@OverRide' on factory constructors in 'submessage.dart' Verified with 'tools/check analyze'.
|
If the UI and logic are identical, then it'd be good to use the same code instead of having two copies of the code. The usual way to do that would be to have this PR stacked on top of the other PR. That is, this PR branch would include all the commits of #2092, and then additional commits on top of that. |
|
Thanks! I'll rebase this PR on top of #2092 to stack them, so we can share the search box code without duplication. |
Implements the 'Filter direct messages' search box feature on the Direct Messages tab, matching the Figma design. The search filtering is: * Real-time (updates as the user types) * Case-insensitive * Filters by recipient names (User display names) * Works for 1:1, Group, and Self DMs The implementation includes: * Reuse of shared 'SearchBox' widget from previous commits * 'TextEditingController' state and filter logic in 'RecentDmConversationsPageBody' * 'CustomScrollView' adoption to support scrolling search box and list * New localization string 'recentDmConversationsFilterPlaceholder' * Comprehensive tests covering all filter scenarios and empty states All existing tests continue to pass (33/33 passing). Fixes: zulip#1903
Implements the 'Filter direct messages' search box feature on the Direct Messages tab, matching the Figma design.
The search filtering is:
The implementation includes:
All existing tests continue to pass (34/34 passing).
WhatsApp.Video.2026-01-23.at.4.19.07.PM.mp4
Fixes: #1903