π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Refine search empty state spacing
ashilkn51b30f56b4f5
diff --git a/mobile/apps/photos/changes/search-empty-state-spacing.md b/mobile/apps/photos/changes/search-empty-state-spacing.mdnew file mode 100644index 0000000000..07318a7ccc--- /dev/null+++ b/mobile/apps/photos/changes/search-empty-state-spacing.md@@ -0,0 +1 @@+- Refine search tab empty-state spacing and processing card alignment.diff --git a/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart b/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dartindex 12b320d29c..7289cbda37 100644--- a/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart+++ b/mobile/apps/photos/lib/ui/components/banners/ml_progress_banner.dart@@ -155,7 +155,7 @@ class _MLProgressBannerState extends State<MLProgressBanner> {);return Padding(- padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),+ padding: const EdgeInsets.symmetric(vertical: 8),child: GestureDetector(behavior: HitTestBehavior.opaque,onTap: () {diff --git a/mobile/apps/photos/lib/ui/viewer/search/result/go_to_map_widget.dart b/mobile/apps/photos/lib/ui/viewer/search/result/go_to_map_widget.dartindex 75201b1592..73017a1a66 100644--- a/mobile/apps/photos/lib/ui/viewer/search/result/go_to_map_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/search/result/go_to_map_widget.dart@@ -15,7 +15,7 @@ class GoToMap extends StatelessWidget {return GestureDetector(onTap: () => openSearchMap(context),child: Padding(- padding: const EdgeInsets.fromLTRB(8, 14, 8, 0),+ padding: const EdgeInsets.symmetric(horizontal: 8),child: Column(mainAxisSize: MainAxisSize.min,mainAxisAlignment: MainAxisAlignment.start,diff --git a/mobile/apps/photos/lib/ui/viewer/search/search_section_cta.dart b/mobile/apps/photos/lib/ui/viewer/search/search_section_cta.dartindex de170cee71..9eb9bb7d60 100644--- a/mobile/apps/photos/lib/ui/viewer/search/search_section_cta.dart+++ b/mobile/apps/photos/lib/ui/viewer/search/search_section_cta.dart@@ -63,14 +63,14 @@ class SearchSectionEmptyCTAIcon extends StatelessWidget {@overrideWidget build(BuildContext context) {if (sectionType.isCTAVisible == false) {- return const SizedBox(height: 115);+ return const SizedBox.shrink();}final textTheme = getEnteTextTheme(context);final colorScheme = getEnteColorScheme(context);return GestureDetector(onTap: sectionType.ctaOnTap(context),child: Padding(- padding: const EdgeInsets.fromLTRB(8, 14, 8, 0),+ padding: const EdgeInsets.symmetric(horizontal: 8),child: Column(children: [DottedBorder(diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/contacts_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/contacts_section.dartindex 6c9a2c2ae7..8631e4447c 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/contacts_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/contacts_section.dart@@ -143,9 +143,9 @@ class _ContactsSectionState extends State<ContactsSection> {final colors = context.componentColors;return Padding(padding: const EdgeInsets.only(- left: searchTabSectionHorizontalPadding + 12,- right: searchTabSectionHorizontalPadding + 8,- bottom: 24,+ left: searchTabSectionHorizontalPadding,+ right: searchTabSectionHorizontalPadding,+ bottom: 20,),child: Row(children: [@@ -157,20 +157,17 @@ class _ContactsSectionState extends State<ContactsSection> {SectionType.contacts.sectionTitle(context),style: TextStyles.h2.copyWith(color: colors.textBase),),- const SizedBox(height: 24),- Padding(- padding: const EdgeInsets.only(left: 4),- child: Text(- SectionType.contacts.getEmptyStateText(context),- style: TextStyles.body.copyWith(color: colors.textLight),- ),+ const SizedBox(height: 16),+ Text(+ SectionType.contacts.getEmptyStateText(context),+ style: TextStyles.body.copyWith(color: colors.textLight),),],),),const SizedBox(width: 8),const Padding(- padding: EdgeInsets.fromLTRB(8, 14, 8, 0),+ padding: EdgeInsets.symmetric(horizontal: 8),child: ContactCTA(),),],diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dartindex 1996162cb2..7d5284cd0e 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/file_type_section.dart@@ -14,7 +14,6 @@ import "package:photos/models/search/search_types.dart";import "package:photos/services/search_service.dart";import "package:photos/theme/ente_theme.dart";import "package:photos/ui/viewer/search/result/search_result_page.dart";-import "package:photos/ui/viewer/search/search_section_cta.dart";import "package:photos/ui/viewer/search_tab/search_tab_horizontal_scroll.dart";import "package:photos/ui/viewer/search_tab/section_header.dart";import "package:photos/utils/pending_translation.dart";@@ -30,9 +29,9 @@ class FileTypeSection extends StatelessWidget {final textTheme = getEnteTextTheme(context);return Padding(padding: const EdgeInsets.only(- left: searchTabSectionHorizontalPadding + 12,- right: searchTabSectionHorizontalPadding + 8,- bottom: 24,+ left: searchTabSectionHorizontalPadding,+ right: searchTabSectionHorizontalPadding,+ bottom: 20,),child: Row(children: [@@ -46,21 +45,16 @@ class FileTypeSection extends StatelessWidget {color: textTheme.largeBold.color,),),- const SizedBox(height: 24),- Padding(- padding: const EdgeInsets.only(left: 4),- child: Text(- SectionType.fileTypesAndExtension.getEmptyStateText(- context,- ),- style: textTheme.smallMuted,+ const SizedBox(height: 16),+ Text(+ SectionType.fileTypesAndExtension.getEmptyStateText(+ context,),+ style: textTheme.smallMuted,),],),),- const SizedBox(width: 8),- const SearchSectionEmptyCTAIcon(SectionType.fileTypesAndExtension),],),);diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/locations_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/locations_section.dartindex 8c53529ab2..dffd722aa1 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/locations_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/locations_section.dart@@ -79,9 +79,9 @@ class _LocationsSectionState extends State<LocationsSection> {final colors = context.componentColors;return Padding(padding: const EdgeInsets.only(- left: searchTabSectionHorizontalPadding + 12,- right: searchTabSectionHorizontalPadding + 8,- bottom: 24,+ left: searchTabSectionHorizontalPadding,+ right: searchTabSectionHorizontalPadding,+ bottom: 20,),child: Row(children: [@@ -93,13 +93,10 @@ class _LocationsSectionState extends State<LocationsSection> {SectionType.location.sectionTitle(context),style: TextStyles.h2.copyWith(color: colors.textBase),),- const SizedBox(height: 24),- Padding(- padding: const EdgeInsets.only(left: 4),- child: Text(- SectionType.location.getEmptyStateText(context),- style: TextStyles.body.copyWith(color: colors.textLight),- ),+ const SizedBox(height: 16),+ Text(+ SectionType.location.getEmptyStateText(context),+ style: TextStyles.body.copyWith(color: colors.textLight),),],),diff --git a/mobile/apps/photos/lib/ui/viewer/search_tab/people_section.dart b/mobile/apps/photos/lib/ui/viewer/search_tab/people_section.dartindex c2f32215bc..f42f916938 100644--- a/mobile/apps/photos/lib/ui/viewer/search_tab/people_section.dart+++ b/mobile/apps/photos/lib/ui/viewer/search_tab/people_section.dart@@ -25,7 +25,6 @@ import "package:photos/ui/viewer/people/people_page.dart";import 'package:photos/ui/viewer/people/person_face_widget.dart';import "package:photos/ui/viewer/search/result/people_section_all_page.dart";import "package:photos/ui/viewer/search/result/search_result_page.dart";-import "package:photos/ui/viewer/search/search_section_cta.dart";import "package:photos/ui/viewer/search_tab/search_tab_horizontal_scroll.dart";import "package:photos/ui/viewer/search_tab/section_header.dart";@@ -115,34 +114,30 @@ class _PeopleSectionState extends State<PeopleSection> {},child: Padding(padding: const EdgeInsets.only(- left: searchTabSectionHorizontalPadding + 16,- right: searchTabSectionHorizontalPadding + 8,+ left: searchTabSectionHorizontalPadding,+ right: searchTabSectionHorizontalPadding,+ bottom: 20,),child: Row(children: [Expanded(- child: Padding(- padding: const EdgeInsets.symmetric(vertical: 12),- child: Column(- crossAxisAlignment: CrossAxisAlignment.start,- children: [- Text(- widget.sectionType.sectionTitle(context),- style: TextStyles.h2.copyWith(- color: textTheme.largeBold.color,- ),- ),- const SizedBox(height: 24),- Text(- widget.sectionType.getEmptyStateText(context),- style: textTheme.smallMuted,+ child: Column(+ crossAxisAlignment: CrossAxisAlignment.start,+ children: [+ Text(+ widget.sectionType.sectionTitle(context),+ style: TextStyles.h2.copyWith(+ color: textTheme.largeBold.color,),- ],- ),+ ),+ const SizedBox(height: 16),+ Text(+ widget.sectionType.getEmptyStateText(context),+ style: textTheme.smallMuted,+ ),+ ],),),- const SizedBox(width: 8),- SearchSectionEmptyCTAIcon(widget.sectionType),],),),