squashed PR for Dropdown Group Menu#295
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Implements a dropdown-based contact group selector on the Contacts screen and introduces a shared UI view-state service so contact/channel filtering & sorting persist across navigation (e.g., moving between screens or opening chats).
Changes:
- Added
UiViewStateService(ChangeNotifier) to centralize and persist contact/channel sort + filter state via SharedPreferences. - Reworked Contacts UI: group selection moved to a dropdown menu; search bar is now expandable/collapsible; group tiles/bottom-sheet flow removed.
- Updated Channels screen to use the shared view-state service; updated localization strings for reserved group-name handling.
Reviewed changes
Copilot reviewed 39 out of 39 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| macos/Flutter/GeneratedPluginRegistrant.swift | Registers path_provider_foundation plugin for macOS. |
| lib/widgets/list_filter_widget.dart | Makes filter menu generic and removes “New group” action; imports enums from contact_search. |
| lib/utils/contact_search.dart | Moves ContactSortOption / ContactTypeFilter enums here for shared use. |
| lib/services/ui_view_state_service.dart | New service to store/persist contacts/channels view state (sort/filter/group selection). |
| lib/services/chat_text_scale_service.dart | Uses unawaited(...) when persisting scale value. |
| lib/screens/contacts_screen.dart | Adds dropdown group menu + expandable search UI; wires filters/sort/group selection to UiViewStateService. |
| lib/screens/channels_screen.dart | Wires channel search + sorting to UiViewStateService and updates filter menu typing. |
| lib/main.dart | Registers and initializes UiViewStateService via Provider at app startup. |
| lib/l10n/app_en.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_de.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_bg.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_es.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_fr.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_it.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_nl.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_pl.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_pt.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_ru.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_sk.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_sl.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_sv.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_uk.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_zh.arb | Adds contacts_groupNameReserved string. |
| lib/l10n/app_localizations.dart | Adds contacts_groupNameReserved to localization API surface. |
| lib/l10n/app_localizations_en.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_de.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_bg.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_es.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_fr.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_it.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_nl.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_pl.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_pt.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_ru.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_sk.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_sl.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_sv.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_uk.dart | Adds contacts_groupNameReserved implementation. |
| lib/l10n/app_localizations_zh.dart | Adds contacts_groupNameReserved implementation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+13
to
+18
| static const _keyContactsSelectedGroupName = 'ui_contacts_selected_group'; | ||
| static const _keyContactsSortOption = 'ui_contacts_sort_option'; | ||
| static const _keyContactsShowUnreadOnly = 'ui_contacts_show_unread_only'; | ||
| static const _keyContactsTypeFilter = 'ui_contacts_type_filter'; | ||
| static const _keyChannelsSortOption = 'ui_channels_sort_option'; | ||
| static const _keyChannelsSortIndexLegacy = 'ui_channels_sort_index'; |
Comment on lines
+747
to
+760
| child: IconButton( | ||
| onPressed: () { | ||
| if (viewState.contactsSearchExpanded) { | ||
| _collapseContactsSearch(viewState); | ||
| return; | ||
| } | ||
| viewState.setContactsSearchExpanded(true); | ||
| }, | ||
| icon: Icon( | ||
| viewState.contactsSearchExpanded | ||
| ? Icons.close | ||
| : Icons.search, | ||
| ), | ||
| ), |
…issal - Move ContactSortOption/ContactTypeFilter enums to dedicated contact_filter_types.dart (re-exported from contact_search.dart) - Migrate ContactsFilterMenu and DiscoveryContactsFilterMenu to use sealed class action types with SortFilterMenu<T> generics, replacing int action constants and switch statements - Guard _closeDropdownAndRun with ModalRoute.isCurrent check to prevent accidental dismissal of parent routes Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # lib/main.dart
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.
Squashed Pull Request for changes on Contact screen from #292
Filter persistance:
In this Pull-Request I want to make changes, that the set Filters will be saved.
With that, pagechanges to/from contacts, channels, map or opening a chat will not reset the filters set.
Dropdown Group Menu, like proposed in Issue #133.
Endstate of Pull Request: