Skip to content

squashed PR for Dropdown Group Menu#295

Merged
zjs81 merged 3 commits into
zjs81:mainfrom
ericszimmermann:ez_group_dropdown3
Mar 15, 2026
Merged

squashed PR for Dropdown Group Menu#295
zjs81 merged 3 commits into
zjs81:mainfrom
ericszimmermann:ez_group_dropdown3

Conversation

@ericszimmermann

Copy link
Copy Markdown
Contributor

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:

simplified handling of Groups through simple dropdown menu
Search bar can be expanded and collapsed for cleaner UI
save state of view (filtering and sorting)

Copilot AI review requested due to automatic review settings March 14, 2026 23:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
),
),
zjs81 and others added 2 commits March 14, 2026 17:59
…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>
Copilot AI review requested due to automatic review settings March 15, 2026 01:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@zjs81 zjs81 merged commit 64698e0 into zjs81:main Mar 15, 2026
6 checks passed
@ericszimmermann ericszimmermann deleted the ez_group_dropdown3 branch March 17, 2026 21:02
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.

3 participants