From f7a4d0ab13bb291b68f9b60d9f301a131a33dc63 Mon Sep 17 00:00:00 2001 From: kumarpalsinh25 Date: Mon, 11 Nov 2024 11:59:59 +0530 Subject: [PATCH 1/9] Fixes, https://github.com/acterglobal/a3/issues/2356 --- app/lib/features/pins/actions/pin_update_actions.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/app/lib/features/pins/actions/pin_update_actions.dart b/app/lib/features/pins/actions/pin_update_actions.dart index a8d548f07247..c722ab64ad74 100644 --- a/app/lib/features/pins/actions/pin_update_actions.dart +++ b/app/lib/features/pins/actions/pin_update_actions.dart @@ -115,6 +115,7 @@ Future updatePinIcon( await updateBuilder.send(); EasyLoading.dismiss(); ref.invalidate(pinProvider); + ref.invalidate(pinListProvider); } catch (e, s) { _log.severe('Failed to change icon of pin', e, s); if (!context.mounted) { From 5ea4214ad8ae435c1573dbc82be0e155e8662f11 Mon Sep 17 00:00:00 2001 From: kumarpalsinh25 Date: Mon, 11 Nov 2024 12:21:08 +0530 Subject: [PATCH 2/9] Fixes, https://github.com/acterglobal/a3/issues/2362 --- app/lib/features/tasks/actions/create_task.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/lib/features/tasks/actions/create_task.dart b/app/lib/features/tasks/actions/create_task.dart index a41eb7a89c12..0e0d4ce9bdab 100644 --- a/app/lib/features/tasks/actions/create_task.dart +++ b/app/lib/features/tasks/actions/create_task.dart @@ -24,9 +24,12 @@ Future showCreateTaskBottomSheet( showDragHandle: true, useSafeArea: true, isScrollControlled: true, - builder: (context) => CreateTaskWidget( - taskList: taskList, - taskName: taskName, + builder: (context) => Padding( + padding: MediaQuery.of(context).viewInsets, + child: CreateTaskWidget( + taskList: taskList, + taskName: taskName, + ), ), ); } From 77f051dc156ebcb594e90dceb5569eec19c5df9c Mon Sep 17 00:00:00 2001 From: kumarpalsinh25 Date: Mon, 11 Nov 2024 12:40:54 +0530 Subject: [PATCH 3/9] Fixes, https://github.com/acterglobal/a3/issues/1704 --- .../features/news/model/news_post_color_data.dart | 12 ++++++++++++ app/lib/features/news/news_utils/news_utils.dart | 7 ++++--- .../news/providers/news_post_editor_providers.dart | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 app/lib/features/news/model/news_post_color_data.dart diff --git a/app/lib/features/news/model/news_post_color_data.dart b/app/lib/features/news/model/news_post_color_data.dart new file mode 100644 index 000000000000..a185abccfa40 --- /dev/null +++ b/app/lib/features/news/model/news_post_color_data.dart @@ -0,0 +1,12 @@ + +import 'package:flutter/material.dart'; + +List newsPostColors = [ + Colors.brown, + Colors.red, + Colors.orange, + Colors.deepPurple, + Colors.purple, + Colors.indigo, + Colors.pink, +]; diff --git a/app/lib/features/news/news_utils/news_utils.dart b/app/lib/features/news/news_utils/news_utils.dart index 15632ea3ad98..8a0666fd69e2 100644 --- a/app/lib/features/news/news_utils/news_utils.dart +++ b/app/lib/features/news/news_utils/news_utils.dart @@ -1,6 +1,7 @@ import 'dart:io'; import 'package:acter/common/utils/utils.dart'; +import 'package:acter/features/news/model/news_post_color_data.dart'; import 'package:acter/features/news/model/news_slide_model.dart'; import 'package:acter/features/news/providers/news_post_editor_providers.dart'; import 'package:acter_flutter_sdk/acter_flutter_sdk.dart'; @@ -51,7 +52,7 @@ class NewsUtils { //Add text slide static void addTextSlide(WidgetRef ref) { - final clr = getRandomElement(Colors.primaries); + final clr = getRandomElement(newsPostColors); NewsSlideItem textSlide = NewsSlideItem( type: NewsSlideType.text, text: '', @@ -62,7 +63,7 @@ class NewsUtils { //Add image slide static Future addImageSlide(WidgetRef ref) async { - final clr = getRandomElement(Colors.primaries); + final clr = getRandomElement(newsPostColors); XFile? imageFile = await imagePicker.pickImage( source: ImageSource.gallery, ); @@ -78,7 +79,7 @@ class NewsUtils { //Add video slide static Future addVideoSlide(WidgetRef ref) async { - final clr = getRandomElement(Colors.primaries); + final clr = getRandomElement(newsPostColors); XFile? videoFile = await imagePicker.pickVideo( source: ImageSource.gallery, ); diff --git a/app/lib/features/news/providers/news_post_editor_providers.dart b/app/lib/features/news/providers/news_post_editor_providers.dart index 98b426edb15a..c7c383f79457 100644 --- a/app/lib/features/news/providers/news_post_editor_providers.dart +++ b/app/lib/features/news/providers/news_post_editor_providers.dart @@ -1,6 +1,7 @@ import 'package:acter/common/utils/utils.dart'; import 'package:acter/common/widgets/event/event_selector_drawer.dart'; import 'package:acter/common/widgets/spaces/space_selector_drawer.dart'; +import 'package:acter/features/news/model/news_post_color_data.dart'; import 'package:acter/features/news/model/news_post_state.dart'; import 'package:acter/features/news/model/news_references_model.dart'; import 'package:acter/features/news/model/news_slide_model.dart'; @@ -21,7 +22,7 @@ class NewsStateNotifier extends StateNotifier { void changeTextSlideBackgroundColor() { NewsSlideItem? selectedNewsSlide = state.currentNewsSlide; - selectedNewsSlide?.backgroundColor = getRandomElement(Colors.primaries); + selectedNewsSlide?.backgroundColor = getRandomElement(newsPostColors); state = state.copyWith(currentNewsSlide: selectedNewsSlide); } From 0cfca1709c8c2a2aec6c351efce3efa8aa4beaf1 Mon Sep 17 00:00:00 2001 From: kumarpalsinh25 Date: Mon, 11 Nov 2024 17:23:45 +0530 Subject: [PATCH 4/9] Fixes,https://github.com/acterglobal/a3/issues/2351 --- .../space/providers/space_navbar_provider.dart | 10 +++++----- .../space/widgets/space_sections/chats_section.dart | 2 +- .../space/widgets/space_sections/spaces_section.dart | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/lib/features/space/providers/space_navbar_provider.dart b/app/lib/features/space/providers/space_navbar_provider.dart index 372fa8aa4c36..cd215dcafa26 100644 --- a/app/lib/features/space/providers/space_navbar_provider.dart +++ b/app/lib/features/space/providers/space_navbar_provider.dart @@ -61,16 +61,16 @@ final tabsProvider = } } - final hasSpaces = await ref.watch(hasSubSpacesProvider(spaceId).future); - if (hasSpaces) { - tabs.add(TabEntry.spaces); - } - final hasChats = await ref.watch(hasSubChatsProvider(spaceId).future); if (hasChats) { tabs.add(TabEntry.chats); } + final hasSpaces = await ref.watch(hasSubSpacesProvider(spaceId).future); + if (hasSpaces) { + tabs.add(TabEntry.spaces); + } + tabs.add(TabEntry.members); final membership = ref.watch(roomMembershipProvider(spaceId)); diff --git a/app/lib/features/space/widgets/space_sections/chats_section.dart b/app/lib/features/space/widgets/space_sections/chats_section.dart index f4ed6d24bc22..7e0aa75bc81c 100644 --- a/app/lib/features/space/widgets/space_sections/chats_section.dart +++ b/app/lib/features/space/widgets/space_sections/chats_section.dart @@ -74,7 +74,7 @@ class ChatsSection extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ SectionHeader( - title: L10n.of(context).suggestedChats, + title: L10n.of(context).chats, isShowSeeAllButton: true, onTapSeeAll: () => context.pushNamed( Routes.subChats.name, diff --git a/app/lib/features/space/widgets/space_sections/spaces_section.dart b/app/lib/features/space/widgets/space_sections/spaces_section.dart index 025827c9950e..2e28a0112c87 100644 --- a/app/lib/features/space/widgets/space_sections/spaces_section.dart +++ b/app/lib/features/space/widgets/space_sections/spaces_section.dart @@ -73,7 +73,7 @@ class SpacesSection extends ConsumerWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ SectionHeader( - title: L10n.of(context).suggestedSpaces, + title: L10n.of(context).spaces, isShowSeeAllButton: true, onTapSeeAll: () => context.pushNamed( Routes.subSpaces.name, From becf82f89bffac147b20807956dc313a741a43f3 Mon Sep 17 00:00:00 2001 From: kumarpalsinh25 Date: Wed, 13 Nov 2024 09:16:43 +0530 Subject: [PATCH 5/9] Fixes, https://github.com/acterglobal/a3/issues/2358 --- .../features/news/widgets/news_full_view.dart | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/app/lib/features/news/widgets/news_full_view.dart b/app/lib/features/news/widgets/news_full_view.dart index feeb5ca40539..d839fafb5e7d 100644 --- a/app/lib/features/news/widgets/news_full_view.dart +++ b/app/lib/features/news/widgets/news_full_view.dart @@ -2,6 +2,7 @@ import 'package:acter/common/animations/like_animation.dart'; import 'package:acter/features/news/providers/news_providers.dart'; import 'package:acter/features/news/widgets/news_item/news_item.dart'; import 'package:acter_flutter_sdk/acter_flutter_sdk_ffi.dart'; +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; @@ -49,21 +50,29 @@ class NewsVerticalViewState extends ConsumerState { } Widget buildPagerView() { - return PageView.builder( - controller: _pageController, - itemCount: widget.newsList.length, - scrollDirection: Axis.vertical, - itemBuilder: (context, index) => InkWell( - onDoubleTap: () async { - LikeAnimation.run(index); - final news = widget.newsList[index]; - final manager = await ref.read(newsReactionsProvider(news).future); - final status = manager.likedByMe(); - if (!status) { - await manager.sendLike(); - } + return ScrollConfiguration( + behavior: ScrollConfiguration.of(context).copyWith( + dragDevices: { + PointerDeviceKind.touch, + PointerDeviceKind.mouse, }, - child: NewsItem(news: widget.newsList[index]), + ), + child: PageView.builder( + controller: _pageController, + itemCount: widget.newsList.length, + scrollDirection: Axis.vertical, + itemBuilder: (context, index) => InkWell( + onDoubleTap: () async { + LikeAnimation.run(index); + final news = widget.newsList[index]; + final manager = await ref.read(newsReactionsProvider(news).future); + final status = manager.likedByMe(); + if (!status) { + await manager.sendLike(); + } + }, + child: NewsItem(news: widget.newsList[index]), + ), ), ); } From 7151d4a080ba48de1245d7245ddd97a95189fae9 Mon Sep 17 00:00:00 2001 From: kumarpalsinh25 Date: Wed, 13 Nov 2024 09:46:11 +0530 Subject: [PATCH 6/9] Add changelog data --- .changes/2361-general-fixes.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changes/2361-general-fixes.md diff --git a/.changes/2361-general-fixes.md b/.changes/2361-general-fixes.md new file mode 100644 index 000000000000..46862d6b13bf --- /dev/null +++ b/.changes/2361-general-fixes.md @@ -0,0 +1,4 @@ +- [Fix] : Pin icon changes now reflected in list immediately +- [Fix] : No more keyboard overlay issue when we do add task from quick action buttons +- [Improvement] : Better color contrast on Boost Post Backgrounds +- [Improvement] : Better boost slide scroll management on desktop \ No newline at end of file From ac272436c5aad506e4370893b0d1caebc32f25bd Mon Sep 17 00:00:00 2001 From: kumarpalsinh25 Date: Wed, 13 Nov 2024 10:10:35 +0530 Subject: [PATCH 7/9] Fixes, https://github.com/acterglobal/a3/issues/2366 --- .../events/providers/event_providers.dart | 49 ++++++++++++++----- 1 file changed, 37 insertions(+), 12 deletions(-) diff --git a/app/lib/features/events/providers/event_providers.dart b/app/lib/features/events/providers/event_providers.dart index a9454d1853c0..c8c43bd078fa 100644 --- a/app/lib/features/events/providers/event_providers.dart +++ b/app/lib/features/events/providers/event_providers.dart @@ -1,5 +1,6 @@ import 'package:acter/features/bookmarks/providers/bookmarks_provider.dart'; import 'package:acter/features/bookmarks/types.dart'; +import 'package:acter/features/bookmarks/util.dart'; import 'package:acter/features/events/providers/event_type_provider.dart'; import 'package:acter/features/events/actions/sort_event_list.dart'; import 'package:acter/features/events/providers/notifiers/event_notifiers.dart'; @@ -186,28 +187,52 @@ final eventListSearchedProvider = FutureProvider.autoDispose final eventListQuickSearchedProvider = FutureProvider.autoDispose>((ref) async { final searchTerm = ref.watch(quickSearchValueProvider); + + final priotizeBookmarkedEvents = await priotizeBookmarked( + ref, + BookmarkType.events, + await ref.watch(allEventListProvider(null).future), + getId: (t) => t.eventId().toString(), + ); + return _filterEventBySearchTerm( searchTerm, - await ref.watch(allEventListProvider(null).future), + priotizeBookmarkedEvents, ); }); final eventListSearchedAndFilterProvider = FutureProvider.autoDispose .family, String?>((ref, spaceId) async { //Declare filtered event list - final filteredEventList = + + final bookmarkedEvents = + await ref.watch(bookmarkedEventListProvider(spaceId).future); + final ongoingEvents = + await ref.watch(allOngoingEventListProvider(spaceId).future); + final upcomingEvents = + await ref.watch(allUpcomingEventListProvider(spaceId).future); + final pastEvents = await ref.watch(allPastEventListProvider(spaceId).future); + + final List filteredEventList = switch (ref.watch(eventListFilterProvider(spaceId))) { - EventFilters.bookmarked => - await ref.watch(bookmarkedEventListProvider(spaceId).future), - EventFilters.ongoing => - await ref.watch(allOngoingEventListProvider(spaceId).future), - EventFilters.upcoming => - await ref.watch(allUpcomingEventListProvider(spaceId).future), - EventFilters.past => - await ref.watch(allPastEventListProvider(spaceId).future), - EventFilters.all => await ref.watch(allEventListProvider(spaceId).future), + EventFilters.bookmarked => bookmarkedEvents, + EventFilters.ongoing => ongoingEvents, + EventFilters.upcoming => upcomingEvents, + EventFilters.past => pastEvents, + EventFilters.all => + ongoingEvents.followedBy(upcomingEvents).followedBy(pastEvents).toList(), }; + final priotizeBookmarkedEvents = await priotizeBookmarked( + ref, + BookmarkType.events, + filteredEventList, + getId: (t) => t.eventId().toString(), + ); + final searchTerm = ref.watch(eventListSearchTermProvider(spaceId)); - return _filterEventBySearchTerm(searchTerm, filteredEventList); + return _filterEventBySearchTerm( + searchTerm, + priotizeBookmarkedEvents, + ); }); From a8fdca1e0ff9b9d646bc832597df7f387b906ca3 Mon Sep 17 00:00:00 2001 From: kumarpalsinh25 Date: Wed, 13 Nov 2024 16:34:49 +0530 Subject: [PATCH 8/9] PF Feedback --- app/lib/features/pins/actions/pin_update_actions.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/lib/features/pins/actions/pin_update_actions.dart b/app/lib/features/pins/actions/pin_update_actions.dart index c722ab64ad74..427650fac7d6 100644 --- a/app/lib/features/pins/actions/pin_update_actions.dart +++ b/app/lib/features/pins/actions/pin_update_actions.dart @@ -114,6 +114,8 @@ Future updatePinIcon( await updateBuilder.send(); EasyLoading.dismiss(); + + //TODO : this only fixes the case where we do the update. if the change comes from outside - another user - this will not trigger. ref.invalidate(pinProvider); ref.invalidate(pinListProvider); } catch (e, s) { From 3507b29d706a49d93cac6510dc95797565916495 Mon Sep 17 00:00:00 2001 From: Benjamin Kampmann Date: Wed, 13 Nov 2024 16:17:27 +0000 Subject: [PATCH 9/9] Put filters back into switch statement --- .../events/providers/event_providers.dart | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/app/lib/features/events/providers/event_providers.dart b/app/lib/features/events/providers/event_providers.dart index c8c43bd078fa..3ff89d5aecf2 100644 --- a/app/lib/features/events/providers/event_providers.dart +++ b/app/lib/features/events/providers/event_providers.dart @@ -205,22 +205,23 @@ final eventListSearchedAndFilterProvider = FutureProvider.autoDispose .family, String?>((ref, spaceId) async { //Declare filtered event list - final bookmarkedEvents = - await ref.watch(bookmarkedEventListProvider(spaceId).future); - final ongoingEvents = - await ref.watch(allOngoingEventListProvider(spaceId).future); - final upcomingEvents = - await ref.watch(allUpcomingEventListProvider(spaceId).future); - final pastEvents = await ref.watch(allPastEventListProvider(spaceId).future); - final List filteredEventList = switch (ref.watch(eventListFilterProvider(spaceId))) { - EventFilters.bookmarked => bookmarkedEvents, - EventFilters.ongoing => ongoingEvents, - EventFilters.upcoming => upcomingEvents, - EventFilters.past => pastEvents, + EventFilters.bookmarked => + await ref.watch(bookmarkedEventListProvider(spaceId).future), + EventFilters.ongoing => + await ref.watch(allOngoingEventListProvider(spaceId).future), + EventFilters.upcoming => + await ref.watch(allUpcomingEventListProvider(spaceId).future), + EventFilters.past => + await ref.watch(allPastEventListProvider(spaceId).future), EventFilters.all => - ongoingEvents.followedBy(upcomingEvents).followedBy(pastEvents).toList(), + (await ref.watch(allOngoingEventListProvider(spaceId).future)) + .followedBy( + await ref.watch(allUpcomingEventListProvider(spaceId).future), + ) + .followedBy(await ref.watch(allPastEventListProvider(spaceId).future)) + .toList(), }; final priotizeBookmarkedEvents = await priotizeBookmarked(