-
Notifications
You must be signed in to change notification settings - Fork 398
channels: Add filter search box to Subscribed Channels page #2092
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'.
|
Thanks. This search box doesn't appear to match what's in the Figma design, though. See in our README about faithfully implementing UI design: https://github.com/zulip/zulip-flutter#ui-design @sarafarajnasardi Please also see the AI use policy in Zulip's contributing guide. Your PR description and commit messages have a lot of text in them that looks like an LLM's output, and is either redundant or untrue. That isn't helpful. |
|
@gnprice Thanks for the feedback. |
|
Great, much better. In that screenshot, the search box's background looks oddly dark. I believe the reason is that it contrasts with a bright white background below it, whereas it's a darker white in the Figma design. That change in background is part of #1406. So let's take this as a prompt to go ahead and do #1406 first. Please go ahead and send a PR for that, and then this PR can get rebased on top of that one. Separately, before we can review this PR, we'll need it to be organized into clear and coherent commits. As part of that, you'll also need to revise the commit messages so that they're accurate and don't have a lot of redundant information, unlike the current LLM-based versions. |

Implements issue #2078, a follow-up to #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:
The implementation includes:
All existing tests continue to pass (28/28 tests passing).
WhatsApp.Video.2026-01-23.at.3.01.59.PM.mp4
Fixes: #2078