From 1e3a726eaac80b4468d0250895ad1c1b03647a60 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Wed, 14 Aug 2024 15:52:34 +0530 Subject: [PATCH 1/4] [mob] Fix 'skip' button being under navigation bar --- .../backup/backup_folder_selection_page.dart | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/mobile/lib/ui/settings/backup/backup_folder_selection_page.dart b/mobile/lib/ui/settings/backup/backup_folder_selection_page.dart index fda3f93431..783a509c12 100644 --- a/mobile/lib/ui/settings/backup/backup_folder_selection_page.dart +++ b/mobile/lib/ui/settings/backup/backup_folder_selection_page.dart @@ -1,4 +1,3 @@ -import 'dart:io'; import 'dart:ui'; import 'package:animated_list_plus/animated_list_plus.dart'; @@ -14,6 +13,7 @@ import 'package:photos/generated/l10n.dart'; import 'package:photos/models/device_collection.dart'; import 'package:photos/models/file/file.dart'; import 'package:photos/services/remote_sync_service.dart'; +import "package:photos/theme/ente_theme.dart"; import 'package:photos/ui/common/loading_widget.dart'; import 'package:photos/ui/viewer/file/thumbnail_widget.dart'; import 'package:photos/utils/dialog_util.dart'; @@ -148,61 +148,61 @@ class _BackupFolderSelectionPageState extends State { }, ), Expanded(child: _getFolders()), - Column( - children: [ - Container( - width: double.infinity, - decoration: BoxDecoration( - boxShadow: [ - BoxShadow( - color: Theme.of(context).colorScheme.background, - blurRadius: 24, - offset: const Offset(0, -8), - spreadRadius: 4, - ), - ], - ), - padding: widget.isOnboarding - ? const EdgeInsets.only(left: 20, right: 20) - : EdgeInsets.only( - top: 16, - left: 20, - right: 20, - bottom: Platform.isIOS ? 60 : 32, - ), - child: OutlinedButton( - onPressed: - widget.isOnboarding && _selectedDevicePathIDs.isEmpty - ? null - : () async { - await updateFolderSettings(); - }, - child: Text(widget.buttonText), - ), - ), - widget.isOnboarding - ? GestureDetector( - key: const ValueKey("skipBackupButton"), - behavior: HitTestBehavior.opaque, - onTap: () { - Navigator.of(context).pop(); - }, - child: Padding( - padding: EdgeInsets.only( - top: 16, - bottom: Platform.isIOS ? 48 : 32, + SafeArea( + child: Padding( + padding: const EdgeInsets.only(bottom: 12), + child: Column( + children: [ + Container( + width: double.infinity, + decoration: BoxDecoration( + boxShadow: [ + BoxShadow( + color: getEnteColorScheme(context).backgroundBase, + blurRadius: 24, + offset: const Offset(0, -8), + spreadRadius: 4, ), - child: Text( - S.of(context).skip, - style: - Theme.of(context).textTheme.bodySmall!.copyWith( + ], + ), + padding: const EdgeInsets.only(left: 20, right: 20), + child: OutlinedButton( + onPressed: + widget.isOnboarding && _selectedDevicePathIDs.isEmpty + ? null + : () async { + await updateFolderSettings(); + }, + child: Text(widget.buttonText), + ), + ), + widget.isOnboarding + ? const SizedBox(height: 20) + : const SizedBox.shrink(), + widget.isOnboarding + ? GestureDetector( + key: const ValueKey("skipBackupButton"), + behavior: HitTestBehavior.opaque, + onTap: () { + Navigator.of(context).pop(); + }, + child: Padding( + padding: const EdgeInsets.only(bottom: 8), + child: Text( + S.of(context).skip, + style: Theme.of(context) + .textTheme + .bodySmall! + .copyWith( decoration: TextDecoration.underline, ), - ), - ), - ) - : const SizedBox.shrink(), - ], + ), + ), + ) + : const SizedBox.shrink(), + ], + ), + ), ), ], ), From f40f39984a6e35db1eeef2e7963bb7297f574d57 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Wed, 14 Aug 2024 16:53:22 +0530 Subject: [PATCH 2/4] [mob][photos] Fix safearea issues --- mobile/lib/ui/map/map_pull_up_gallery.dart | 14 +++++++++----- mobile/lib/ui/tabs/shared_collections_tab.dart | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mobile/lib/ui/map/map_pull_up_gallery.dart b/mobile/lib/ui/map/map_pull_up_gallery.dart index f52439759e..22f1071888 100644 --- a/mobile/lib/ui/map/map_pull_up_gallery.dart +++ b/mobile/lib/ui/map/map_pull_up_gallery.dart @@ -71,11 +71,15 @@ class _MapPullUpGalleryState extends State { }, ), DeferPointer( - child: FileSelectionOverlayBar( - GalleryType.searchResults, - _selectedFiles, - backgroundColor: - getEnteColorScheme(context).backgroundElevated2, + //This is to make the FileSelectionOverlayBar respect SafeArea + child: MediaQuery( + data: MediaQueryData.fromView(View.of(context)), + child: FileSelectionOverlayBar( + GalleryType.searchResults, + _selectedFiles, + backgroundColor: + getEnteColorScheme(context).backgroundElevated2, + ), ), ), ], diff --git a/mobile/lib/ui/tabs/shared_collections_tab.dart b/mobile/lib/ui/tabs/shared_collections_tab.dart index 8f4b61b38a..92c044c9fe 100644 --- a/mobile/lib/ui/tabs/shared_collections_tab.dart +++ b/mobile/lib/ui/tabs/shared_collections_tab.dart @@ -84,7 +84,7 @@ class _SharedCollectionsTabState extends State (snapshot.data?.outgoing.length ?? 0) == 0) { return const Center(child: SharedEmptyStateWidget()); } - return _getSharedCollectionsGallery(snapshot.data!); + return SafeArea(child: _getSharedCollectionsGallery(snapshot.data!)); } else if (snapshot.hasError) { _logger.severe( "critical: failed to load share gallery", From ecbd2b4480dda34b1979801c2ae9a54f722e5c3c Mon Sep 17 00:00:00 2001 From: ashilkn Date: Wed, 14 Aug 2024 17:21:23 +0530 Subject: [PATCH 3/4] [mob][photos] Fix safearea issues --- .../ui/components/action_sheet_widget.dart | 80 ++++++++++--------- .../payment/subscription_common_widgets.dart | 4 +- 2 files changed, 44 insertions(+), 40 deletions(-) diff --git a/mobile/lib/ui/components/action_sheet_widget.dart b/mobile/lib/ui/components/action_sheet_widget.dart index aa4662792b..4e23e91b4f 100644 --- a/mobile/lib/ui/components/action_sheet_widget.dart +++ b/mobile/lib/ui/components/action_sheet_widget.dart @@ -73,46 +73,48 @@ class ActionSheetWidget extends StatelessWidget { title == null && bodyWidget == null && body == null; final extraWidth = MediaQuery.of(context).size.width - restrictedMaxWidth; final double? horizontalPadding = extraWidth > 0 ? extraWidth / 2 : null; - return Padding( - padding: EdgeInsets.fromLTRB( - horizontalPadding ?? 12, - 12, - horizontalPadding ?? 12, - 32, - ), - child: Container( - decoration: BoxDecoration(boxShadow: shadowMenuLight), - child: ClipRRect( - borderRadius: const BorderRadius.all(Radius.circular(8)), - child: Container( - color: backgroundElevated2Dark, - child: Padding( - padding: EdgeInsets.fromLTRB( - 24, - 24, - 24, - isTitleAndBodyNull ? 24 : 28, - ), - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - isTitleAndBodyNull - ? const SizedBox.shrink() - : Padding( - padding: const EdgeInsets.only(bottom: 36), - child: ContentContainerWidget( - title: title, - bodyWidget: bodyWidget, - body: body, - bodyHighlight: bodyHighlight, - actionSheetType: actionSheetType, - isCheckIconGreen: isCheckIconGreen, + return SafeArea( + child: Padding( + padding: EdgeInsets.fromLTRB( + horizontalPadding ?? 12, + 12, + horizontalPadding ?? 12, + 32, + ), + child: Container( + decoration: BoxDecoration(boxShadow: shadowMenuLight), + child: ClipRRect( + borderRadius: const BorderRadius.all(Radius.circular(8)), + child: Container( + color: backgroundElevated2Dark, + child: Padding( + padding: EdgeInsets.fromLTRB( + 24, + 24, + 24, + isTitleAndBodyNull ? 24 : 28, + ), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + isTitleAndBodyNull + ? const SizedBox.shrink() + : Padding( + padding: const EdgeInsets.only(bottom: 36), + child: ContentContainerWidget( + title: title, + bodyWidget: bodyWidget, + body: body, + bodyHighlight: bodyHighlight, + actionSheetType: actionSheetType, + isCheckIconGreen: isCheckIconGreen, + ), ), - ), - ActionButtons( - actionButtons, - ), - ], + ActionButtons( + actionButtons, + ), + ], + ), ), ), ), diff --git a/mobile/lib/ui/payment/subscription_common_widgets.dart b/mobile/lib/ui/payment/subscription_common_widgets.dart index 5a1c95c563..cc75495011 100644 --- a/mobile/lib/ui/payment/subscription_common_widgets.dart +++ b/mobile/lib/ui/payment/subscription_common_widgets.dart @@ -175,7 +175,9 @@ class SubFaqWidget extends StatelessWidget { barrierColor: Colors.black87, context: context, builder: (context) { - return const BillingQuestionsWidget(); + return const SafeArea( + child: BillingQuestionsWidget(), + ); }, ); }, From d2536241f75eb8b8178e4b886bbf6909b0becbc8 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Wed, 14 Aug 2024 17:32:26 +0530 Subject: [PATCH 4/4] [mob][photos] chore --- mobile/ios/Podfile.lock | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock index 2ee64030ba..47f378bd59 100644 --- a/mobile/ios/Podfile.lock +++ b/mobile/ios/Podfile.lock @@ -140,6 +140,8 @@ PODS: - Mantle (2.2.0): - Mantle/extobjc (= 2.2.0) - Mantle/extobjc (2.2.0) + - maps_launcher (0.0.1): + - Flutter - media_extension (0.0.1): - Flutter - media_kit_libs_ios_video (1.0.4): @@ -269,6 +271,7 @@ DEPENDENCIES: - integration_test (from `.symlinks/plugins/integration_test/ios`) - local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`) - local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`) + - maps_launcher (from `.symlinks/plugins/maps_launcher/ios`) - media_extension (from `.symlinks/plugins/media_extension/ios`) - media_kit_libs_ios_video (from `.symlinks/plugins/media_kit_libs_ios_video/ios`) - media_kit_native_event_loop (from `.symlinks/plugins/media_kit_native_event_loop/ios`) @@ -377,6 +380,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/local_auth_darwin/darwin" local_auth_ios: :path: ".symlinks/plugins/local_auth_ios/ios" + maps_launcher: + :path: ".symlinks/plugins/maps_launcher/ios" media_extension: :path: ".symlinks/plugins/media_extension/ios" media_kit_libs_ios_video: @@ -472,6 +477,7 @@ SPEC CHECKSUMS: local_auth_darwin: c7e464000a6a89e952235699e32b329457608d98 local_auth_ios: 5046a18c018dd973247a0564496c8898dbb5adf9 Mantle: c5aa8794a29a022dfbbfc9799af95f477a69b62d + maps_launcher: 2e5b6a2d664ec6c27f82ffa81b74228d770ab203 media_extension: 6d30dc1431ebaa63f43c397c37917b1a0a597a4c media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1 media_kit_native_event_loop: e6b2ab20cf0746eb1c33be961fcf79667304fa2a