π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add bottom spacing to the upload Save button
AmanRajSinghMouryad6dd7644bc05
diff --git a/mobile/apps/locker/changes/upload-save-button-spacing.md b/mobile/apps/locker/changes/upload-save-button-spacing.mdnew file mode 100644index 0000000000..b29de3d30b--- /dev/null+++ b/mobile/apps/locker/changes/upload-save-button-spacing.md@@ -0,0 +1 @@+- Added spacing below the Save button on the upload screen.diff --git a/mobile/apps/locker/lib/ui/pages/file_upload_screen.dart b/mobile/apps/locker/lib/ui/pages/file_upload_screen.dartindex ab6da8e2eb..1951559616 100644--- a/mobile/apps/locker/lib/ui/pages/file_upload_screen.dart+++ b/mobile/apps/locker/lib/ui/pages/file_upload_screen.dart@@ -252,6 +252,7 @@ class _FileUploadScreenState extends State<FileUploadScreen> {),const SizedBox(height: 12),SafeArea(+ minimum: const EdgeInsets.only(bottom: 8),child: ButtonComponent(label: context.strings.save,onTap: () async {diff --git a/mobile/apps/locker/test/ui/pages/file_upload_screen_test.dart b/mobile/apps/locker/test/ui/pages/file_upload_screen_test.dartnew file mode 100644index 0000000000..1d1f2a26c4--- /dev/null+++ b/mobile/apps/locker/test/ui/pages/file_upload_screen_test.dart@@ -0,0 +1,49 @@+import 'dart:io';++import 'package:ente_components/ente_components.dart';+import 'package:ente_strings/ente_strings.dart';+import 'package:flutter/material.dart';+import 'package:flutter_test/flutter_test.dart';+import 'package:locker/services/configuration.dart';+import 'package:locker/ui/pages/file_upload_screen.dart';++import '../../test_utils/configuration_test_util.dart';++void main() {+ late Directory testRoot;++ setUp(() async {+ testRoot = await setupLockerConfigurationForTest('file_upload_screen');+ await Configuration.instance.setUserID(1);+ });++ tearDown(() async {+ clearLockerConfigurationTestHandlers();+ await testRoot.delete(recursive: true);+ });++ for (final bottomInset in [0.0, 24.0]) {+ testWidgets('Save has spacing above a $bottomInset bottom inset', (+ tester,+ ) async {+ tester.view.devicePixelRatio = 1;+ tester.view.physicalSize = const Size(400, 800);+ tester.view.padding = FakeViewPadding(bottom: bottomInset);+ addTearDown(tester.view.reset);++ await tester.pumpWidget(+ MaterialApp(+ localizationsDelegates: StringsLocalizations.localizationsDelegates,+ supportedLocales: const [Locale('en')],+ home: FileUploadScreen(+ files: [File('${testRoot.path}/document.pdf')],+ collections: const [],+ ),+ ),+ );++ final save = find.widgetWithText(ButtonComponent, 'Save');+ expect(tester.getRect(save).bottom, 800 - bottomInset - 8);+ });+ }+}