π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Improve Help & Support menu spacing readability
ashilknd0acb6cb4e56
diff --git a/mobile/apps/photos/lib/ui/components/menu_item_widget/menu_item_widget_new.dart b/mobile/apps/photos/lib/ui/components/menu_item_widget/menu_item_widget_new.dartindex 32924308fc..9735035fe8 100644--- a/mobile/apps/photos/lib/ui/components/menu_item_widget/menu_item_widget_new.dart+++ b/mobile/apps/photos/lib/ui/components/menu_item_widget/menu_item_widget_new.dart@@ -13,6 +13,9 @@ import 'package:photos/ui/components/menu_item_widget/menu_item_child_widgets.daclass MenuItemWidgetNew extends StatefulWidget {final String title;final String? subText;+ final TextStyle? subTextStyle;+ final double verticalPaddingWithSubText;+ final double titleToSubTextSpacing;/// Color for the title textfinal Color? titleColor;@@ -61,6 +64,9 @@ class MenuItemWidgetNew extends StatefulWidget {const MenuItemWidgetNew({required this.title,this.subText,+ this.subTextStyle,+ this.verticalPaddingWithSubText = 9.0,+ this.titleToSubTextSpacing = 0.0,this.titleColor,this.leadingIcon,this.leadingIconColor,@@ -148,7 +154,8 @@ class _MenuItemWidgetNewState extends State<MenuItemWidgetNew> {final effectiveMenuItemColor = menuItemColor ?? defaultMenuItemColor;final bool hasSubText =widget.subText != null && widget.subText!.isNotEmpty;- final verticalPadding = hasSubText ? 9.0 : 16.0;+ final verticalPadding =+ hasSubText ? widget.verticalPaddingWithSubText : 16.0;return AnimatedContainer(duration: const Duration(milliseconds: 20),@@ -183,11 +190,14 @@ class _MenuItemWidgetNewState extends State<MenuItemWidgetNew> {? textTheme.small.copyWith(color: widget.titleColor): textTheme.small,),+ if (widget.titleToSubTextSpacing > 0)+ SizedBox(height: widget.titleToSubTextSpacing),Text(widget.subText!,maxLines: 1,overflow: TextOverflow.ellipsis,- style: textTheme.tinyMuted.copyWith(height: 17 / 10),+ style: widget.subTextStyle ??+ textTheme.tinyMuted.copyWith(height: 17 / 10),),],)diff --git a/mobile/apps/photos/lib/ui/settings/support/help_support_page.dart b/mobile/apps/photos/lib/ui/settings/support/help_support_page.dartindex a3cc6af5e0..65444e7806 100644--- a/mobile/apps/photos/lib/ui/settings/support/help_support_page.dart+++ b/mobile/apps/photos/lib/ui/settings/support/help_support_page.dart@@ -7,7 +7,6 @@ import "package:photos/theme/ente_theme.dart";import "package:photos/ui/common/web_page.dart";import "package:photos/ui/components/menu_item_widget/menu_item_widget_new.dart";import "package:photos/ui/components/menu_section_title.dart";-import "package:photos/ui/components/settings/settings_grouped_card.dart";import "package:photos/ui/notification/toast.dart";import "package:photos/ui/settings/support/ask_question_page.dart";import "package:photos/ui/settings/support/report_issue_page.dart";@@ -59,39 +58,39 @@ class HelpSupportPage extends StatelessWidget {crossAxisAlignment: CrossAxisAlignment.start,children: [MenuSectionTitle(title: l10n.browseHelpPages),- SettingsGroupedCard(- children: [- _buildHelpTopicItem(- context,- title: l10n.searchAndDiscovery,- subText: l10n.searchAndDiscoveryDesc,- icon: HugeIcons.strokeRoundedSearch01,- ),- _buildHelpTopicItem(- context,- title: l10n.backupAndSync,- subText: l10n.backupAndSyncDesc,- icon: HugeIcons.strokeRoundedCloudUpload,- ),- _buildHelpTopicItem(- context,- title: l10n.sharingAndCollaboration,- subText: l10n.sharingAndCollaborationDesc,- icon: HugeIcons.strokeRoundedShare01,- ),- _buildHelpTopicItem(- context,- title: l10n.storageAndPlans,- subText: l10n.storageAndPlansDesc,- icon: HugeIcons.strokeRoundedHardDrive,- ),- _buildHelpTopicItem(- context,- title: l10n.troubleshooting,- subText: l10n.troubleshootingDesc,- icon: HugeIcons.strokeRoundedWrench01,- ),- ],+ _buildHelpTopicItem(+ context,+ title: l10n.searchAndDiscovery,+ subText: l10n.searchAndDiscoveryDesc,+ icon: HugeIcons.strokeRoundedSearch01,+ ),+ const SizedBox(height: 8),+ _buildHelpTopicItem(+ context,+ title: l10n.backupAndSync,+ subText: l10n.backupAndSyncDesc,+ icon: HugeIcons.strokeRoundedCloudUpload,+ ),+ const SizedBox(height: 8),+ _buildHelpTopicItem(+ context,+ title: l10n.sharingAndCollaboration,+ subText: l10n.sharingAndCollaborationDesc,+ icon: HugeIcons.strokeRoundedShare01,+ ),+ const SizedBox(height: 8),+ _buildHelpTopicItem(+ context,+ title: l10n.storageAndPlans,+ subText: l10n.storageAndPlansDesc,+ icon: HugeIcons.strokeRoundedHardDrive,+ ),+ const SizedBox(height: 8),+ _buildHelpTopicItem(+ context,+ title: l10n.troubleshooting,+ subText: l10n.troubleshootingDesc,+ icon: HugeIcons.strokeRoundedWrench01,),_SupportLink(label: l10n.viewAllHelpTopics,@@ -104,59 +103,54 @@ class HelpSupportPage extends StatelessWidget {),const SizedBox(height: 24),MenuSectionTitle(title: l10n.getInTouch),- SettingsGroupedCard(- children: [- MenuItemWidgetNew(- title: l10n.reportAnIssue,- borderRadius: 0,- leadingIconWidget: _buildIconWidget(- context,- HugeIcons.strokeRoundedBug02,- ),- trailingIcon: Icons.chevron_right_outlined,- trailingIconIsMuted: true,- onTap: () async {- await Navigator.of(context).push(- MaterialPageRoute(- builder: (context) => const ReportIssuePage(),- ),- );- },- ),- MenuItemWidgetNew(- title: l10n.askAQuestion,- borderRadius: 0,- leadingIconWidget: _buildIconWidget(- context,- HugeIcons.strokeRoundedHelpCircle,+ MenuItemWidgetNew(+ title: l10n.reportAnIssue,+ leadingIconWidget: _buildIconWidget(+ context,+ HugeIcons.strokeRoundedBug02,+ ),+ trailingIcon: Icons.chevron_right_outlined,+ trailingIconIsMuted: true,+ onTap: () async {+ await Navigator.of(context).push(+ MaterialPageRoute(+ builder: (context) => const ReportIssuePage(),),- trailingIcon: Icons.chevron_right_outlined,- trailingIconIsMuted: true,- onTap: () async {- await Navigator.of(context).push(- MaterialPageRoute(- builder: (context) => const AskQuestionPage(),- ),- );- },- ),- MenuItemWidgetNew(- title: l10n.requestAFeature,- borderRadius: 0,- leadingIconWidget: _buildIconWidget(- context,- HugeIcons.strokeRoundedIdea01,+ );+ },+ ),+ const SizedBox(height: 8),+ MenuItemWidgetNew(+ title: l10n.askAQuestion,+ leadingIconWidget: _buildIconWidget(+ context,+ HugeIcons.strokeRoundedHelpCircle,+ ),+ trailingIcon: Icons.chevron_right_outlined,+ trailingIconIsMuted: true,+ onTap: () async {+ await Navigator.of(context).push(+ MaterialPageRoute(+ builder: (context) => const AskQuestionPage(),),- trailingIcon: Icons.chevron_right_outlined,- trailingIconIsMuted: true,- onTap: () async {- await launchUrlString(- githubDiscussionsUrl,- mode: LaunchMode.externalApplication,- );- },- ),- ],+ );+ },+ ),+ const SizedBox(height: 8),+ MenuItemWidgetNew(+ title: l10n.requestAFeature,+ leadingIconWidget: _buildIconWidget(+ context,+ HugeIcons.strokeRoundedIdea01,+ ),+ trailingIcon: Icons.chevron_right_outlined,+ trailingIconIsMuted: true,+ onTap: () async {+ await launchUrlString(+ githubDiscussionsUrl,+ mode: LaunchMode.externalApplication,+ );+ },),_SupportLink(label: l10n.exportLogs,@@ -182,10 +176,13 @@ class HelpSupportPage extends StatelessWidget {required String subText,required List<List<dynamic>> icon,}) {+ final textTheme = getEnteTextTheme(context);return MenuItemWidgetNew(title: title,subText: subText,- borderRadius: 0,+ subTextStyle: textTheme.miniMuted,+ verticalPaddingWithSubText: 12,+ titleToSubTextSpacing: 2,leadingIconWidget: _buildIconWidget(context, icon),trailingIcon: Icons.chevron_right_outlined,trailingIconIsMuted: true,