π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile] Add Outfit display typography and update Photos navigation (#10661)
Aman Raj1f3513d92745
diff --git a/mobile/apps/photos/assets/2.0x/on_device_empty.png b/mobile/apps/photos/assets/2.0x/on_device_empty.pngnew file mode 100644index 0000000000..379ee908ffBinary files /dev/null and b/mobile/apps/photos/assets/2.0x/on_device_empty.png differdiff --git a/mobile/apps/photos/assets/3.0x/on_device_empty.png b/mobile/apps/photos/assets/3.0x/on_device_empty.pngnew file mode 100644index 0000000000..0fc1736069Binary files /dev/null and b/mobile/apps/photos/assets/3.0x/on_device_empty.png differdiff --git a/mobile/apps/photos/assets/icons/album_empty_thumbnail.svg b/mobile/apps/photos/assets/icons/album_empty_thumbnail.svgnew file mode 100644index 0000000000..71169f2988--- /dev/null+++ b/mobile/apps/photos/assets/icons/album_empty_thumbnail.svg@@ -0,0 +1,4 @@+<svg preserveAspectRatio="xMidYMid meet" width="35" height="20" viewBox="0 0 35 20" fill="none" xmlns="http://www.w3.org/2000/svg">+ <path d="M6.70754 11.6156L0 20H35L25.5263 7.08135C24.7533 6.02721 23.1934 5.98588 22.3656 6.9976L15 16L9.57086 11.3465C8.71204 10.6103 7.41415 10.7323 6.70754 11.6156Z" fill="currentColor"/>+ <circle cx="14" cy="4" r="4" fill="currentColor"/>+</svg>diff --git a/mobile/apps/photos/assets/icons/nav_bar/albums_filled.svg b/mobile/apps/photos/assets/icons/nav_bar/albums_filled.svgnew file mode 100644index 0000000000..70114cb9eb--- /dev/null+++ b/mobile/apps/photos/assets/icons/nav_bar/albums_filled.svg@@ -0,0 +1,6 @@+<svg preserveAspectRatio="xMidYMid meet" width="18" height="18" viewBox="0 0 16.5 16.5" fill="none" xmlns="http://www.w3.org/2000/svg">+<g id="elements">+<path id="Subtract" d="M13.3379 3.07617C14.1499 3.20964 14.84 3.47087 15.3965 4.02734C16.001 4.63201 16.2611 5.39366 16.3828 6.29883C16.5016 7.18258 16.5 8.30988 16.5 9.71192C16.5 11.1136 16.5016 12.2404 16.3828 13.124C16.2611 14.0293 16.0012 14.7918 15.3965 15.3965C14.7918 16.0012 14.0293 16.2611 13.124 16.3828C12.2404 16.5016 11.1136 16.5 9.71192 16.5C8.30988 16.5 7.18258 16.5016 6.29883 16.3828C5.39366 16.2611 4.63201 16.001 4.02734 15.3965C3.47087 14.84 3.20964 14.1499 3.07617 13.3379C3.16876 13.3542 3.26257 13.3709 3.3584 13.3838C4.2369 13.5019 5.35709 13.5 6.75 13.5C8.14291 13.5 9.2631 13.5019 10.1416 13.3838C11.0417 13.2628 11.7995 13.0033 12.4014 12.4014C13.0033 11.7995 13.2628 11.0417 13.3838 10.1416C13.5019 9.2631 13.5 8.14291 13.5 6.75C13.5 5.35709 13.5019 4.2369 13.3838 3.3584C13.3709 3.26257 13.3542 3.16876 13.3379 3.07617Z" fill="#000000"/>+<path id="Vector" d="M0.750001 6.75C0.750001 3.92157 0.750001 2.50736 1.62868 1.62868C2.50736 0.750001 3.92157 0.750001 6.75 0.750001C9.57843 0.750001 10.9926 0.750001 11.8713 1.62868C12.75 2.50736 12.75 3.92157 12.75 6.75C12.75 9.57843 12.75 10.9926 11.8713 11.8713C10.9926 12.75 9.57843 12.75 6.75 12.75C3.92157 12.75 2.50736 12.75 1.62868 11.8713C0.750001 10.9926 0.750001 9.57843 0.750001 6.75Z" stroke="#000000" stroke-width="1.5"/>+</g>+</svg>diff --git a/mobile/apps/photos/assets/icons/nav_bar/albums_outline.svg b/mobile/apps/photos/assets/icons/nav_bar/albums_outline.svgnew file mode 100644index 0000000000..fafa024157--- /dev/null+++ b/mobile/apps/photos/assets/icons/nav_bar/albums_outline.svg@@ -0,0 +1,6 @@+<svg preserveAspectRatio="xMidYMid meet" width="18" height="18" viewBox="0 0 16.5 16.5" fill="none" xmlns="http://www.w3.org/2000/svg">+<g id="elements">+<path id="Vector" d="M3.75 12.7308C3.84653 13.7122 4.06467 14.3727 4.55768 14.8657C5.44197 15.75 6.86522 15.75 9.7117 15.75C12.5582 15.75 13.9814 15.75 14.8657 14.8657C15.75 13.9814 15.75 12.5582 15.75 9.7117C15.75 6.86522 15.75 5.44197 14.8657 4.55768C14.3727 4.06467 13.7122 3.84653 12.7308 3.75" stroke="#000000" stroke-width="1.5"/>+<path id="Vector_2" d="M0.750001 6.75C0.750001 3.92157 0.750001 2.50736 1.62868 1.62868C2.50736 0.750001 3.92157 0.750001 6.75 0.750001C9.57843 0.750001 10.9926 0.750001 11.8713 1.62868C12.75 2.50736 12.75 3.92157 12.75 6.75C12.75 9.57843 12.75 10.9926 11.8713 11.8713C10.9926 12.75 9.57843 12.75 6.75 12.75C3.92157 12.75 2.50736 12.75 1.62868 11.8713C0.750001 10.9926 0.750001 9.57843 0.750001 6.75Z" stroke="#000000" stroke-width="1.5"/>+</g>+</svg>diff --git a/mobile/apps/photos/assets/icons/nav_bar/feed_filled.svg b/mobile/apps/photos/assets/icons/nav_bar/feed_filled.svgnew file mode 100644index 0000000000..bd4594e79d--- /dev/null+++ b/mobile/apps/photos/assets/icons/nav_bar/feed_filled.svg@@ -0,0 +1,5 @@+<svg preserveAspectRatio="xMidYMid meet" width="18" height="18" viewBox="0 0 14.857 13.2499" fill="none" xmlns="http://www.w3.org/2000/svg">+<g id="elements">+<path id="Vector" d="M8.39689 12.1302C7.84745 12.6266 7.00769 12.622 6.46013 12.1235C3.02069 9.00464 0.75 6.94766 0.75 4.42318C0.75 2.3662 2.3662 0.75 4.42318 0.75C5.58524 0.75 6.70055 1.29096 7.42851 2.14581C8.15647 1.29096 9.27178 0.75 10.4338 0.75C12.4908 0.75 14.107 2.3662 14.107 4.42318C14.107 6.94766 11.8363 9.00464 8.39689 12.1302Z" fill="#000000" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+</g>+</svg>diff --git a/mobile/apps/photos/assets/icons/nav_bar/feed_outline.svg b/mobile/apps/photos/assets/icons/nav_bar/feed_outline.svgnew file mode 100644index 0000000000..fbf80e9fc5--- /dev/null+++ b/mobile/apps/photos/assets/icons/nav_bar/feed_outline.svg@@ -0,0 +1,5 @@+<svg preserveAspectRatio="xMidYMid meet" width="18" height="18" viewBox="0 0 17.5003 15.5752" fill="none" xmlns="http://www.w3.org/2000/svg">+<g id="elements">+<path id="Vector" d="M9.91016 14.3822C9.25199 14.9769 8.24604 14.9714 7.59012 14.3742C3.47005 10.6382 0.75 8.17413 0.75 5.15008C0.75 2.68603 2.68603 0.75 5.15008 0.75C6.5421 0.75 7.87812 1.39801 8.75014 2.42203C9.62216 1.39801 10.9582 0.75 12.3502 0.75C14.8142 0.75 16.7503 2.68603 16.7503 5.15008C16.7503 8.17413 14.0302 10.6382 9.91016 14.3822Z" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+</g>+</svg>diff --git a/mobile/apps/photos/assets/icons/nav_bar/home_filled.svg b/mobile/apps/photos/assets/icons/nav_bar/home_filled.svgnew file mode 100644index 0000000000..1d70ac57dc--- /dev/null+++ b/mobile/apps/photos/assets/icons/nav_bar/home_filled.svg@@ -0,0 +1,3 @@+<svg preserveAspectRatio="xMidYMid meet" width="18" height="18" viewBox="0 0 14.625 16.2723" fill="none" xmlns="http://www.w3.org/2000/svg">+<path id="Subtract" d="M5.8667 0.591153C6.66908 -0.197051 7.95592 -0.197051 8.7583 0.591153L14.0083 5.74887C14.4029 6.13657 14.6249 6.6671 14.625 7.2203V13.4598C14.625 15.0131 13.3658 16.2723 11.8125 16.2723H9.8125C9.26022 16.2723 8.8125 15.8246 8.8125 15.2723V11.2098C8.81241 10.3815 8.14087 9.7098 7.3125 9.7098C6.48413 9.7098 5.81259 10.3815 5.8125 11.2098V15.2723C5.8125 15.8246 5.36478 16.2723 4.8125 16.2723H2.8125C1.2592 16.2723 6.18483e-06 15.0131 0 13.4598V7.2203C9.7543e-05 6.6671 0.222072 6.13657 0.616699 5.74887L5.8667 0.591153Z" fill="#000000"/>+</svg>diff --git a/mobile/apps/photos/assets/icons/nav_bar/home_outline.svg b/mobile/apps/photos/assets/icons/nav_bar/home_outline.svgnew file mode 100644index 0000000000..2dbae55fa5--- /dev/null+++ b/mobile/apps/photos/assets/icons/nav_bar/home_outline.svg@@ -0,0 +1,3 @@+<svg preserveAspectRatio="xMidYMid meet" width="18" height="18" viewBox="0 0 15 16.4463" fill="none" xmlns="http://www.w3.org/2000/svg">+<path id="Vector 594" d="M1.34836 5.98999L6.09836 1.32333C6.87644 0.558891 8.12356 0.558891 8.90164 1.32333L13.6516 5.98999C14.0344 6.36603 14.25 6.8801 14.25 7.41667V12.6963C14.25 14.3531 12.9069 15.6963 11.25 15.6963H7.5H3.75C2.09315 15.6963 0.75 14.3531 0.75 12.6963V7.41667C0.75 6.8801 0.965602 6.36603 1.34836 5.98999Z" stroke="#000000" stroke-width="1.5"/>+</svg>diff --git a/mobile/apps/photos/assets/icons/nav_bar/search_filled.svg b/mobile/apps/photos/assets/icons/nav_bar/search_filled.svgnew file mode 100644index 0000000000..30a021cac6--- /dev/null+++ b/mobile/apps/photos/assets/icons/nav_bar/search_filled.svg@@ -0,0 +1,4 @@+<svg preserveAspectRatio="xMidYMid meet" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">+<path id="Vector" d="M10.7081 10.7081L15.75 15.75M12.4167 6.58333C12.4167 9.80508 9.80508 12.4167 6.58333 12.4167C3.36158 12.4167 0.75 9.80508 0.75 6.58333C0.75 3.36158 3.36158 0.75 6.58333 0.75C9.80508 0.75 12.4167 3.36158 12.4167 6.58333Z" transform="translate(0.75 0.75)" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+<circle id="Ellipse 2330" cx="7.3125" cy="7.3125" r="3.9375" fill="#000000"/>+</svg>diff --git a/mobile/apps/photos/assets/icons/nav_bar/search_outline.svg b/mobile/apps/photos/assets/icons/nav_bar/search_outline.svgnew file mode 100644index 0000000000..e00f7493d6--- /dev/null+++ b/mobile/apps/photos/assets/icons/nav_bar/search_outline.svg@@ -0,0 +1,3 @@+<svg preserveAspectRatio="xMidYMid meet" width="18" height="18" viewBox="0 0 16.5 16.5" fill="none" xmlns="http://www.w3.org/2000/svg">+<path id="Vector" d="M10.7081 10.7081L15.75 15.75M12.4167 6.58333C12.4167 9.80508 9.80508 12.4167 6.58333 12.4167C3.36158 12.4167 0.75 9.80508 0.75 6.58333C0.75 3.36158 3.36158 0.75 6.58333 0.75C9.80508 0.75 12.4167 3.36158 12.4167 6.58333Z" stroke="#000000" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>+</svg>diff --git a/mobile/apps/photos/assets/on_device_empty.png b/mobile/apps/photos/assets/on_device_empty.pngnew file mode 100644index 0000000000..e6b3a26b78Binary files /dev/null and b/mobile/apps/photos/assets/on_device_empty.png differdiff --git a/mobile/apps/photos/fonts/Outfit-Bold.ttf b/mobile/apps/photos/fonts/Outfit-Bold.ttfnew file mode 100644index 0000000000..f9f2f72afdBinary files /dev/null and b/mobile/apps/photos/fonts/Outfit-Bold.ttf differdiff --git a/mobile/apps/photos/fonts/Outfit-Medium.ttf b/mobile/apps/photos/fonts/Outfit-Medium.ttfnew file mode 100644index 0000000000..4bbf177638Binary files /dev/null and b/mobile/apps/photos/fonts/Outfit-Medium.ttf differdiff --git a/mobile/apps/photos/fonts/Outfit-Regular.ttf b/mobile/apps/photos/fonts/Outfit-Regular.ttfnew file mode 100644index 0000000000..3939ab246eBinary files /dev/null and b/mobile/apps/photos/fonts/Outfit-Regular.ttf differdiff --git a/mobile/apps/photos/fonts/Outfit-SemiBold.ttf b/mobile/apps/photos/fonts/Outfit-SemiBold.ttfnew file mode 100644index 0000000000..1f28bda7b8Binary files /dev/null and b/mobile/apps/photos/fonts/Outfit-SemiBold.ttf differdiff --git a/mobile/apps/photos/lib/ui/home/home_bottom_nav_bar.dart b/mobile/apps/photos/lib/ui/home/home_bottom_nav_bar.dartindex 7f019acfc5..b8061d1fea 100644--- a/mobile/apps/photos/lib/ui/home/home_bottom_nav_bar.dart+++ b/mobile/apps/photos/lib/ui/home/home_bottom_nav_bar.dart@@ -1,13 +1,13 @@import 'dart:async';+import 'dart:math' as math;+import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';+import 'package:flutter_svg/flutter_svg.dart';import 'package:photos/core/event_bus.dart';import 'package:photos/events/tab_changed_event.dart';import "package:photos/models/selected_albums.dart";import 'package:photos/models/selected_files.dart';-import "package:photos/theme/colors.dart";-import 'package:photos/theme/ente_theme.dart';-import 'package:photos/ui/tabs/nav_bar.dart';class HomeBottomNavigationBar extends StatefulWidget {const HomeBottomNavigationBar(@@ -109,14 +109,13 @@ class _HomeBottomNavigationBarState extends State<HomeBottomNavigationBar> {Widget build(BuildContext context) {final bool filesAreSelected = widget.selectedFiles.files.isNotEmpty;final bool albumsAreSelected = widget.selectedAlbums.albums.isNotEmpty;- final enteColorScheme = getEnteColorScheme(context);return SafeArea(child: RepaintBoundary(child: AnimatedContainer(duration: const Duration(milliseconds: 300),curve: Curves.easeInOut,- height: filesAreSelected || albumsAreSelected ? 0 : 56,+ height: filesAreSelected || albumsAreSelected ? 0 : 62,child: IgnorePointer(ignoring: filesAreSelected || albumsAreSelected,child: ListView(@@ -125,75 +124,11 @@ class _HomeBottomNavigationBarState extends State<HomeBottomNavigationBar> {Row(mainAxisAlignment: MainAxisAlignment.center,children: [- GNav(- curve: Curves.easeOutExpo,- backgroundColor: getEnteColorScheme(- context,- ).backgroundElevated2,- mainAxisAlignment: MainAxisAlignment.center,- iconSize: 24,- padding: const EdgeInsets.fromLTRB(16, 6, 16, 6),- duration: const Duration(milliseconds: 200),- gap: 0,- tabBorderRadius: 32,- tabBackgroundColor:- Theme.of(context).brightness == Brightness.light- ? strokeFainterLight- : strokeSolidFaintLight,- haptic: false,- tabs: [- GButton(- margin: const EdgeInsets.fromLTRB(8, 6, 10, 6),- icon: Icons.home_rounded,- iconColor: enteColorScheme.tabIcon,- iconActiveColor: strokeBaseLight,- text: '',- onPressed: () {- _onTabChange(- 0,- mode: "OnPressed",- ); // To take care of occasional missing events- },- ),- GButton(- margin: const EdgeInsets.fromLTRB(10, 6, 10, 6),- icon: Icons.collections_rounded,- iconColor: enteColorScheme.tabIcon,- iconActiveColor: strokeBaseLight,- text: '',- onPressed: () {- _onTabChange(- 1,- mode: "OnPressed",- ); // To take care of occasional missing- // events- },- ),- GButton(- margin: const EdgeInsets.fromLTRB(10, 6, 8, 6),- icon: Icons.people_outlined,- iconColor: enteColorScheme.tabIcon,- iconActiveColor: strokeBaseLight,- text: '',- onPressed: () {- _onTabChange(2, mode: "OnPressed"); // To take care- // of occasional missing events- },- ),- GButton(- margin: const EdgeInsets.fromLTRB(10, 6, 8, 6),- icon: Icons.search_outlined,- iconColor: enteColorScheme.tabIcon,- iconActiveColor: strokeBaseLight,- text: '',- onPressed: () {- _onTabChange(3, mode: "OnPressed"); // To take care- // of occasional missing events- },- ),- ],+ _FigmaHomeNavBar(selectedIndex: currentTabIndex,- onTabChange: _onTabChange,+ onTabChange: (index) {+ _onTabChange(index, mode: "OnPressed");+ },),],),@@ -205,3 +140,146 @@ class _HomeBottomNavigationBarState extends State<HomeBottomNavigationBar> {);}}++class _FigmaHomeNavBar extends StatelessWidget {+ const _FigmaHomeNavBar({+ required this.selectedIndex,+ required this.onTabChange,+ });++ static const _tabs = [+ _FigmaNavTab(+ semanticLabel: 'Home',+ outlineAsset: 'assets/icons/nav_bar/home_outline.svg',+ filledAsset: 'assets/icons/nav_bar/home_filled.svg',+ ),+ _FigmaNavTab(+ semanticLabel: 'Albums',+ outlineAsset: 'assets/icons/nav_bar/albums_outline.svg',+ filledAsset: 'assets/icons/nav_bar/albums_filled.svg',+ ),+ _FigmaNavTab(+ semanticLabel: 'Feed',+ outlineAsset: 'assets/icons/nav_bar/feed_outline.svg',+ filledAsset: 'assets/icons/nav_bar/feed_filled.svg',+ ),+ _FigmaNavTab(+ semanticLabel: 'Search',+ outlineAsset: 'assets/icons/nav_bar/search_outline.svg',+ filledAsset: 'assets/icons/nav_bar/search_filled.svg',+ ),+ ];++ final int selectedIndex;+ final ValueChanged<int> onTabChange;++ @override+ Widget build(BuildContext context) {+ final colors = context.componentColors;+ final navWidth = math.min(+ 318.0,+ math.max(0.0, MediaQuery.sizeOf(context).width - 32.0),+ );++ return Container(+ width: navWidth,+ height: 62,+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),+ decoration: BoxDecoration(+ color: colors.fillLight,+ borderRadius: BorderRadius.circular(20),+ boxShadow: const [+ BoxShadow(+ color: Color.fromRGBO(0, 0, 0, 0.25),+ offset: Offset(0, 4),+ blurRadius: 8.75,+ ),+ ],+ ),+ child: Row(+ mainAxisAlignment: MainAxisAlignment.spaceBetween,+ children: List.generate(_tabs.length, (index) {+ return _FigmaNavButton(+ tab: _tabs[index],+ selected: selectedIndex == index,+ onTap: () => onTabChange(index),+ );+ }),+ ),+ );+ }+}++class _FigmaNavButton extends StatelessWidget {+ const _FigmaNavButton({+ required this.tab,+ required this.selected,+ required this.onTap,+ });++ final _FigmaNavTab tab;+ final bool selected;+ final VoidCallback onTap;++ @override+ Widget build(BuildContext context) {+ final colors = context.componentColors;+ final iconColor = colors.iconColor;+ return Semantics(+ label: tab.semanticLabel,+ selected: selected,+ button: true,+ child: GestureDetector(+ behavior: HitTestBehavior.opaque,+ onTap: onTap,+ child: AnimatedContainer(+ duration: const Duration(milliseconds: 200),+ curve: Curves.easeOutExpo,+ width: 38,+ height: 38,+ padding: const EdgeInsets.all(10),+ decoration: BoxDecoration(+ color: selected ? colors.fillDark : colors.fillLight,+ borderRadius: BorderRadius.circular(12),+ ),+ child: _FigmaNavIcon(tab: tab, selected: selected, color: iconColor),+ ),+ ),+ );+ }+}++class _FigmaNavIcon extends StatelessWidget {+ const _FigmaNavIcon({+ required this.tab,+ required this.selected,+ required this.color,+ });++ final _FigmaNavTab tab;+ final bool selected;+ final Color color;++ @override+ Widget build(BuildContext context) {+ final colorFilter = ColorFilter.mode(color, BlendMode.srcIn);+ return SvgPicture.asset(+ selected ? tab.filledAsset : tab.outlineAsset,+ width: 18,+ height: 18,+ colorFilter: colorFilter,+ );+ }+}++class _FigmaNavTab {+ const _FigmaNavTab({+ required this.semanticLabel,+ required this.outlineAsset,+ required this.filledAsset,+ });++ final String semanticLabel;+ final String outlineAsset;+ final String filledAsset;+}diff --git a/mobile/apps/photos/lib/ui/social/feed_screen.dart b/mobile/apps/photos/lib/ui/social/feed_screen.dartindex bb35c91fec..17759ee447 100644--- a/mobile/apps/photos/lib/ui/social/feed_screen.dart+++ b/mobile/apps/photos/lib/ui/social/feed_screen.dart@@ -564,7 +564,7 @@ class _FeedScreenState extends State<FeedScreen> {AppLocalizations.of(context).feed,style: widget.showBackButton? TextStyles.bodyBold.copyWith(color: textTheme.bodyBold.color)- : TextStyles.h1Bold.copyWith(color: textTheme.h4Bold.color),+ : TextStyles.display1.copyWith(color: textTheme.h4Bold.color),),),body: _isLoadingdiff --git a/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart b/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dartindex 4027c50127..734953e23e 100644--- a/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart+++ b/mobile/apps/photos/lib/ui/social/widgets/comment_input_widget.dart@@ -148,9 +148,7 @@ class _CommentInputWidgetState extends State<CommentInputWidget>),decoration: InputDecoration(hintText: l10n.commentHint,- hintStyle: textTheme.body.copyWith(- color: colorScheme.textMuted,- ),+ hintStyle: textTheme.bodyFaint,border: InputBorder.none,filled: true,fillColor: Colors.transparent,diff --git a/mobile/apps/photos/lib/ui/tabs/albums/albums_manage_sheet.dart b/mobile/apps/photos/lib/ui/tabs/albums/albums_manage_sheet.dartindex af31bd9955..0a7e585cce 100644--- a/mobile/apps/photos/lib/ui/tabs/albums/albums_manage_sheet.dart+++ b/mobile/apps/photos/lib/ui/tabs/albums/albums_manage_sheet.dart@@ -23,7 +23,7 @@ Future<void> showAlbumsManageSheet(BuildContext context) {builder: (sheetContext) {final colors = sheetContext.componentColors;return BottomSheetComponent(- title: strings.manage,+ title: strings.more,content: Column(mainAxisSize: MainAxisSize.min,children: [diff --git a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_device_empty_state.dart b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_device_empty_state.dartindex ce19065b1d..9ba8b3c139 100644--- a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_device_empty_state.dart+++ b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_device_empty_state.dart@@ -5,15 +5,11 @@ import "package:photos/ui/common/backup_flow_helper.dart";import "package:photos/ui/tabs/albums/empty_states/empty_state_feature_row.dart";class OnDeviceEmptyState extends StatelessWidget {- const OnDeviceEmptyState.permission({- this.onFoldersSelected,- super.key,- }) : _mode = _OnDeviceEmptyStateMode.permission;+ const OnDeviceEmptyState.permission({this.onFoldersSelected, super.key})+ : _mode = _OnDeviceEmptyStateMode.permission;- const OnDeviceEmptyState.noFolders({- this.onFoldersSelected,- super.key,- }) : _mode = _OnDeviceEmptyStateMode.noFolders;+ const OnDeviceEmptyState.noFolders({this.onFoldersSelected, super.key})+ : _mode = _OnDeviceEmptyStateMode.noFolders;static const _permissionTopPadding = 12.0;static const _permissionSectionSpacing = 48.0;@@ -42,117 +38,109 @@ class OnDeviceEmptyState extends StatelessWidget {strings.albumsOnDevicePermissionFeatureControlUploads,];- return LayoutBuilder(- builder: (context, constraints) {- return SingleChildScrollView(- physics: const BouncingScrollPhysics(),- child: ConstrainedBox(- constraints: BoxConstraints(minHeight: constraints.maxHeight),- child: Align(- alignment: Alignment.bottomCenter,- child: Padding(- padding: EdgeInsets.fromLTRB(- 16,- _permissionTopPadding,- 16,- bottomPadding,- ),- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- SizedBox(- width: _contentWidth,- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- Image.asset(- "assets/on_device.png",- ),- const SizedBox(height: _permissionSectionSpacing),- Text(- strings.allowAccessToYourPhotos,- textAlign: TextAlign.center,- style: TextStyle(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 24,- height: 28 / 24,- letterSpacing: 0,- color: colors.textBase,- ),- ),- const SizedBox(height: 24),- SizedBox(- width: _featureWidth,- child: Column(- children: [- EmptyStateBulletFeatureRow(- label: features[0],- ),- const SizedBox(height: 12),- EmptyStateBulletFeatureRow(- label: features[1],- ),- const SizedBox(height: 12),- EmptyStateBulletFeatureRow(- label: features[2],- ),- ],- ),- ),- ],- ),+ return Align(+ alignment: Alignment.bottomCenter,+ child: Padding(+ padding: EdgeInsets.fromLTRB(+ 16,+ _permissionTopPadding,+ 16,+ bottomPadding,+ ),+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ SizedBox(+ width: _contentWidth,+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ Image.asset("assets/on_device.png"),+ const SizedBox(height: _permissionSectionSpacing),+ Text(+ strings.allowAccessToYourPhotos,+ textAlign: TextAlign.center,+ style: TextStyle(+ fontFamily: "Nunito",+ fontWeight: FontWeight.w800,+ fontSize: 24,+ height: 28 / 24,+ letterSpacing: 0,+ color: colors.textBase,),- const SizedBox(height: _permissionSectionSpacing),- ButtonComponent(- label: strings.albumsOnDevicePermissionCta,- shouldSurfaceExecutionStates: false,- onTap: () => _selectFolders(context),+ ),+ const SizedBox(height: 24),+ SizedBox(+ width: _featureWidth,+ child: Column(+ children: [+ EmptyStateBulletFeatureRow(label: features[0]),+ const SizedBox(height: 12),+ EmptyStateBulletFeatureRow(label: features[1]),+ const SizedBox(height: 12),+ EmptyStateBulletFeatureRow(label: features[2]),+ ],),- ],- ),+ ),+ ],),),- ),- );- },+ const SizedBox(height: _permissionSectionSpacing),+ ButtonComponent(+ label: strings.albumsOnDevicePermissionCta,+ shouldSurfaceExecutionStates: false,+ onTap: () => _selectFolders(context),+ ),+ ],+ ),+ ),);}Widget _buildNoFoldersState(BuildContext context) {final colors = context.componentColors;final strings = AppLocalizations.of(context);+ final bottomPadding = 64 + MediaQuery.paddingOf(context).bottom + 32;- return Center(- child: SizedBox(- width: _contentWidth,- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- SizedBox(- width: _contentWidth,- child: Text(- strings.noAlbumsOnThisDevice,- textAlign: TextAlign.center,- style: TextStyle(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 24,- height: 28 / 24,- letterSpacing: 0,- color: colors.textBase,+ return Align(+ alignment: Alignment.bottomCenter,+ child: Padding(+ padding: EdgeInsets.fromLTRB(+ 16,+ _permissionTopPadding,+ 16,+ bottomPadding,+ ),+ child: SizedBox(+ width: _contentWidth,+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ Image.asset("assets/on_device_empty.png", fit: BoxFit.contain),+ const SizedBox(height: _permissionSectionSpacing),+ SizedBox(+ width: _contentWidth,+ child: Text(+ strings.noAlbumsOnThisDevice,+ textAlign: TextAlign.center,+ style: TextStyle(+ fontFamily: "Nunito",+ fontWeight: FontWeight.w800,+ fontSize: 24,+ height: 28 / 24,+ letterSpacing: 0,+ color: colors.textBase,+ ),),),- ),- const SizedBox(height: 8),- Text(- strings.startSnappingYourPhotosWillShowUpHere,- textAlign: TextAlign.center,- style: TextStyles.mini.copyWith(- color: colors.textLight,+ const SizedBox(height: 8),+ Text(+ strings.startSnappingYourPhotosWillShowUpHere,+ textAlign: TextAlign.center,+ style: TextStyles.mini.copyWith(color: colors.textLight),),- ),- ],+ ],+ ),),),);@@ -164,7 +152,4 @@ class OnDeviceEmptyState extends StatelessWidget {}}-enum _OnDeviceEmptyStateMode {- permission,- noFolders,-}+enum _OnDeviceEmptyStateMode { permission, noFolders }diff --git a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_ente_empty_state.dart b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_ente_empty_state.dartindex 9a3ed9eafb..cca8329d2c 100644--- a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_ente_empty_state.dart+++ b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/on_ente_empty_state.dart@@ -23,73 +23,58 @@ class OnEnteEmptyState extends StatelessWidget {strings.albumsOnEnteEmptyFeaturePrivacy,];- return LayoutBuilder(- builder: (context, constraints) {- return SingleChildScrollView(- physics: const BouncingScrollPhysics(),- child: ConstrainedBox(- constraints: BoxConstraints(minHeight: constraints.maxHeight),- child: Align(- alignment: Alignment.bottomCenter,- child: Padding(- padding: EdgeInsets.fromLTRB(- 16,- _topPadding,- 16,- bottomPadding,- ),- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- Image.asset("assets/on_ente.png"),- const SizedBox(height: _sectionSpacing),- SizedBox(- width: _contentWidth,- child: Column(- children: [- Text(- strings.albumsOnEnteEmptyTitle,- textAlign: TextAlign.center,- style: TextStyle(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 24,- height: 28 / 24,- letterSpacing: 0,- color: colors.textBase,- ),- ),- const SizedBox(height: 24),- SizedBox(- width: _featureWidth,- child: Column(- children: [- EmptyStateBulletFeatureRow(label: features[0]),- const SizedBox(height: 12),- EmptyStateBulletFeatureRow(label: features[1]),- const SizedBox(height: 12),- EmptyStateBulletFeatureRow(label: features[2]),- ],- ),- ),- ],- ),+ return Align(+ alignment: Alignment.bottomCenter,+ child: Padding(+ padding: EdgeInsets.fromLTRB(16, _topPadding, 16, bottomPadding),+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ Image.asset("assets/on_ente.png"),+ const SizedBox(height: _sectionSpacing),+ SizedBox(+ width: _contentWidth,+ child: Column(+ children: [+ Text(+ strings.albumsOnEnteEmptyTitle,+ textAlign: TextAlign.center,+ style: TextStyle(+ fontFamily: "Nunito",+ fontWeight: FontWeight.w800,+ fontSize: 24,+ height: 28 / 24,+ letterSpacing: 0,+ color: colors.textBase,),- const SizedBox(height: _sectionSpacing),- ButtonComponent(- label: strings.albumsOnEnteEmptyCta,- shouldSurfaceExecutionStates: false,- onTap: () async {- await handleFolderSelectionBackupFlow(context);- },+ ),+ const SizedBox(height: 24),+ SizedBox(+ width: _featureWidth,+ child: Column(+ children: [+ EmptyStateBulletFeatureRow(label: features[0]),+ const SizedBox(height: 12),+ EmptyStateBulletFeatureRow(label: features[1]),+ const SizedBox(height: 12),+ EmptyStateBulletFeatureRow(label: features[2]),+ ],),- ],- ),+ ),+ ],),),- ),- );- },+ const SizedBox(height: _sectionSpacing),+ ButtonComponent(+ label: strings.albumsOnEnteEmptyCta,+ shouldSurfaceExecutionStates: false,+ onTap: () async {+ await handleFolderSelectionBackupFlow(context);+ },+ ),+ ],+ ),+ ),);}}diff --git a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/shared_empty_state.dart b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/shared_empty_state.dartindex bced6ddb3d..e511c34eae 100644--- a/mobile/apps/photos/lib/ui/tabs/albums/empty_states/shared_empty_state.dart+++ b/mobile/apps/photos/lib/ui/tabs/albums/empty_states/shared_empty_state.dart@@ -24,77 +24,62 @@ class SharedEmptyState extends StatelessWidget {strings.albumsSharedEmptyFeaturePrivacy,];- return LayoutBuilder(- builder: (context, constraints) {- return SingleChildScrollView(- physics: const BouncingScrollPhysics(),- child: ConstrainedBox(- constraints: BoxConstraints(minHeight: constraints.maxHeight),- child: Align(- alignment: Alignment.bottomCenter,- child: Padding(- padding: EdgeInsets.fromLTRB(- 16,- _topPadding,- 16,- bottomPadding,- ),- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- SizedBox(- width: _contentWidth,- child: Column(- mainAxisSize: MainAxisSize.min,- children: [- Image.asset("assets/shared.png", fit: BoxFit.contain),- const SizedBox(height: _sectionSpacing),- Text(- strings.albumsSharedEmptyTitle,- textAlign: TextAlign.center,- style: TextStyle(- fontFamily: "Nunito",- fontWeight: FontWeight.w800,- fontSize: 24,- height: 28 / 24,- letterSpacing: 0,- color: colors.textBase,- ),- ),- const SizedBox(height: 24),- SizedBox(- width: _featureWidth,- child: Column(- children: [- EmptyStateBulletFeatureRow(label: features[0]),- const SizedBox(height: 12),- EmptyStateBulletFeatureRow(label: features[1]),- const SizedBox(height: 12),- EmptyStateBulletFeatureRow(label: features[2]),- ],- ),- ),- ],- ),+ return Align(+ alignment: Alignment.bottomCenter,+ child: Padding(+ padding: EdgeInsets.fromLTRB(16, _topPadding, 16, bottomPadding),+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ SizedBox(+ width: _contentWidth,+ child: Column(+ mainAxisSize: MainAxisSize.min,+ children: [+ Image.asset("assets/shared.png", fit: BoxFit.contain),+ const SizedBox(height: _sectionSpacing),+ Text(+ strings.albumsSharedEmptyTitle,+ textAlign: TextAlign.center,+ style: TextStyle(+ fontFamily: "Nunito",+ fontWeight: FontWeight.w800,+ fontSize: 24,+ height: 28 / 24,+ letterSpacing: 0,+ color: colors.textBase,),- const SizedBox(height: _contentToButtonSpacing),- ButtonComponent(- label: strings.shareAnAlbum,- shouldSurfaceExecutionStates: false,- onTap: () async {- showCollectionActionSheet(- context,- actionType: CollectionActionType.shareCollection,- );- },+ ),+ const SizedBox(height: 24),+ SizedBox(+ width: _featureWidth,+ child: Column(+ children: [+ EmptyStateBulletFeatureRow(label: features[0]),+ const SizedBox(height: 12),+ EmptyStateBulletFeatureRow(label: features[1]),+ const SizedBox(height: 12),+ EmptyStateBulletFeatureRow(label: features[2]),+ ],),- ],- ),+ ),+ ],),),- ),- );- },+ const SizedBox(height: _contentToButtonSpacing),+ ButtonComponent(+ label: strings.shareAnAlbum,+ shouldSurfaceExecutionStates: false,+ onTap: () async {+ showCollectionActionSheet(+ context,+ actionType: CollectionActionType.shareCollection,+ );+ },+ ),+ ],+ ),+ ),);}}diff --git a/mobile/apps/photos/lib/ui/tabs/albums_tab.dart b/mobile/apps/photos/lib/ui/tabs/albums_tab.dartindex c8f03d311d..024f913c61 100644--- a/mobile/apps/photos/lib/ui/tabs/albums_tab.dart+++ b/mobile/apps/photos/lib/ui/tabs/albums_tab.dart@@ -342,9 +342,13 @@ class _AlbumsTabState extends State<AlbumsTab>switchInCurve: Curves.easeOutCubic,switchOutCurve: Curves.easeInCubic,child: _shouldShowDeleteEmptyAlbums.value- ? DeleteEmptyAlbums(+ ? Padding(key: const ValueKey("delete_empty_albums_action"),- onDeleted: () => _loadEnteCollections(),+ padding: const EdgeInsets.only(top: 8),+ child: DeleteEmptyAlbums(+ padding: const EdgeInsets.symmetric(horizontal: 16),+ onDeleted: () => _loadEnteCollections(),+ ),): const SizedBox.shrink(key: ValueKey("delete_empty_albums_hidden"),@@ -713,7 +717,7 @@ class _AlbumsTabState extends State<AlbumsTab>child: Column(children: [Padding(- padding: const EdgeInsets.symmetric(horizontal: 8),+ padding: const EdgeInsets.symmetric(horizontal: 16),child: SizedBox(height: _kHeaderToolbarHeight,child: AnimatedSwitcher(@@ -794,7 +798,7 @@ class _AlbumsTabState extends State<AlbumsTab>child: Text(strings.albums,key: const ValueKey("albums_title"),- style: TextStyles.h1Bold.copyWith(+ style: TextStyles.display1.copyWith(color: textTheme.h4Bold.color,),),diff --git a/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart b/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dartindex af7c6feb2c..06ef66098a 100644--- a/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart+++ b/mobile/apps/photos/lib/ui/viewer/actions/delete_empty_albums.dart@@ -10,8 +10,13 @@ import 'package:photos/services/collections_service.dart';class DeleteEmptyAlbums extends StatefulWidget {final Future<void> Function()? onDeleted;+ final EdgeInsetsGeometry padding;- const DeleteEmptyAlbums({super.key, this.onDeleted});+ const DeleteEmptyAlbums({+ super.key,+ this.onDeleted,+ this.padding = const EdgeInsets.symmetric(horizontal: 16, vertical: 8),+ });@overrideState<DeleteEmptyAlbums> createState() => _DeleteEmptyAlbumsState();@@ -36,13 +41,13 @@ class _DeleteEmptyAlbumsState extends State<DeleteEmptyAlbums> {child: Align(alignment: Alignment.centerLeft,child: Padding(- padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),+ padding: widget.padding,child: Text(AppLocalizations.of(context).deleteEmptyAlbums,style: TextStyles.body.copyWith(- color: colors.textBase,+ color: colors.textLight,decoration: TextDecoration.underline,- decorationColor: colors.textBase,+ decorationColor: colors.textLight,),),),diff --git a/mobile/apps/photos/lib/ui/viewer/file/no_thumbnail_widget.dart b/mobile/apps/photos/lib/ui/viewer/file/no_thumbnail_widget.dartindex 98665a8f8d..97d0f3fed9 100644--- a/mobile/apps/photos/lib/ui/viewer/file/no_thumbnail_widget.dart+++ b/mobile/apps/photos/lib/ui/viewer/file/no_thumbnail_widget.dart@@ -1,31 +1,37 @@+import "package:ente_components/ente_components.dart";import 'package:flutter/material.dart';-import 'package:photos/theme/ente_theme.dart';+import "package:flutter_svg/flutter_svg.dart";class NoThumbnailWidget extends StatelessWidget {final bool addBorder;final double borderRadius;+ final double iconWidth;+ final double iconHeight;const NoThumbnailWidget({this.addBorder = true,this.borderRadius = 1,+ this.iconWidth = 35,+ this.iconHeight = 20,super.key,});@overrideWidget build(BuildContext context) {- final enteColorScheme = getEnteColorScheme(context);+ final colors = context.componentColors;return Container(decoration: BoxDecoration(borderRadius: BorderRadius.circular(borderRadius),border: addBorder- ? Border.all(color: enteColorScheme.strokeFaint, width: 1)+ ? Border.all(color: colors.strokeFaint, width: 1): null,- color: enteColorScheme.fillFaint,+ color: colors.fillLight,),child: Center(- child: Icon(- Icons.photo_outlined,- color: enteColorScheme.strokeMuted,- size: 24,+ child: SvgPicture.asset(+ "assets/icons/album_empty_thumbnail.svg",+ width: iconWidth,+ height: iconHeight,+ colorFilter: ColorFilter.mode(colors.textLightest, BlendMode.srcIn),),),);diff --git a/mobile/apps/photos/pubspec.yaml b/mobile/apps/photos/pubspec.yamlindex 489c9c3ca4..abcc3ceb1b 100644--- a/mobile/apps/photos/pubspec.yaml+++ b/mobile/apps/photos/pubspec.yaml@@ -400,6 +400,7 @@ flutter:- assets/video-editor/- assets/image-editor/- assets/icons/+ - assets/icons/nav_bar/- assets/launcher_icon/fonts:- family: Inter@@ -409,6 +410,15 @@ flutter:- asset: fonts/Inter-Light.ttf- asset: fonts/Inter-SemiBold.ttf- asset: fonts/Inter-Bold.ttf+ - family: Outfit+ fonts:+ - asset: fonts/Outfit-Regular.ttf+ - asset: fonts/Outfit-Medium.ttf+ weight: 500+ - asset: fonts/Outfit-SemiBold.ttf+ weight: 600+ - asset: fonts/Outfit-Bold.ttf+ weight: 700- family: Montserratfonts:- asset: fonts/Montserrat-Bold.ttfdiff --git a/mobile/packages/ente_components/lib/components/app_bar_component.dart b/mobile/packages/ente_components/lib/components/app_bar_component.dartindex 8fd8bb4a54..443ee64933 100644--- a/mobile/packages/ente_components/lib/components/app_bar_component.dart+++ b/mobile/packages/ente_components/lib/components/app_bar_component.dart@@ -680,9 +680,12 @@ _HeaderAppBarMetrics _resolveHeaderAppBarMetrics(final textScaler = MediaQuery.textScalerOf(context);final expandedTitleLineHeight = _scaledLineHeight(textScaler,- TextStyles.h1Bold,+ TextStyles.display2,+ );+ final collapsedTitleLineHeight = _scaledLineHeight(+ textScaler,+ TextStyles.display3,);- final collapsedTitleLineHeight = _scaledLineHeight(textScaler, TextStyles.h2);final subtitleLineHeight = _scaledLineHeight(textScaler, TextStyles.mini);final defaultExpandedHeight = subtitle == null? _titleOnlyExpandedHeight@@ -768,8 +771,8 @@ class _MovingHeaderTitle extends StatelessWidget {maxLines: 1,overflow: TextOverflow.ellipsis,style: TextStyle.lerp(- TextStyles.h1Bold,- TextStyles.h2,+ TextStyles.display2,+ TextStyles.display3,progress,)!.copyWith(color: colors.textBase),);diff --git a/mobile/packages/ente_components/lib/theme/text_styles.dart b/mobile/packages/ente_components/lib/theme/text_styles.dartindex 376c2b0278..789310d9c8 100644--- a/mobile/packages/ente_components/lib/theme/text_styles.dart+++ b/mobile/packages/ente_components/lib/theme/text_styles.dart@@ -2,11 +2,30 @@ import 'package:flutter/material.dart';/// Figma: https://www.figma.com/design/BuBNPPytxlVnqfmCUW0mgz/Ente-Visual-Design?node-id=7672-54672&m=dev/// Section: Text styles-/// Specs: Inter, letter spacing 0; H1 20/28, H2 18/24, body 14/20, mini 12/16, tiny 10/12.+/// Specs: Inter body scale, Outfit display title scale, letter spacing 0.+/// Display-1 32/40, Display-2 24/32, Display-3 20/28; H1 20/28, H2 18/24,+/// body 14/20, mini 12/16, tiny 10/12.class TextStyles {const TextStyles._();static const String fontFamily = 'Inter';+ static const String outfitFontFamily = 'Outfit';++ static const display1 = TextStyle(+ fontFamily: outfitFontFamily,+ fontSize: 32,+ height: 40 / 32,+ fontWeight: FontWeight.w600,+ letterSpacing: 0,+ );++ static const display2 = TextStyle(+ fontFamily: outfitFontFamily,+ fontSize: 24,+ height: 32 / 24,+ fontWeight: FontWeight.w600,+ letterSpacing: 0,+ );static const h1 = TextStyle(fontFamily: fontFamily,@@ -40,6 +59,14 @@ class TextStyles {letterSpacing: 0,);+ static const display3 = TextStyle(+ fontFamily: outfitFontFamily,+ fontSize: 20,+ height: 28 / 20,+ fontWeight: FontWeight.w600,+ letterSpacing: 0,+ );+static const bodyBold = TextStyle(fontFamily: fontFamily,fontSize: 14,diff --git a/mobile/packages/ente_components/test/components/app_surface_widgets_test.dart b/mobile/packages/ente_components/test/components/app_surface_widgets_test.dartindex b7c317c545..636eee067d 100644--- a/mobile/packages/ente_components/test/components/app_surface_widgets_test.dart+++ b/mobile/packages/ente_components/test/components/app_surface_widgets_test.dart@@ -5,6 +5,7 @@ import 'package:ente_components/components/menu_component.dart';import 'package:ente_components/components/menu_group_component.dart';import 'package:ente_components/theme/colors.dart';import 'package:ente_components/theme/icon_sizes.dart';+import 'package:ente_components/theme/text_styles.dart';import 'package:ente_components/theme/theme.dart';import 'package:flutter/material.dart';import 'package:flutter_test/flutter_test.dart';@@ -533,9 +534,9 @@ void main() {);expect(tester.getCenter(find.byKey(const ValueKey('header-leading'))).dy,- closeTo(71, 1),+ closeTo(73, 1),);- expect(tester.getCenter(find.byIcon(Icons.add)).dy, closeTo(67, 1));+ expect(tester.getCenter(find.byIcon(Icons.add)).dy, closeTo(73, 1));await tester.tap(find.byKey(const ValueKey('header-leading')));await tester.pump();@@ -603,13 +604,15 @@ void main() {await tester.pump();final title = tester.widget<Text>(find.text('Menu items'));- expect(title.style?.fontSize, greaterThan(18));+ expect(title.style?.fontSize, greaterThan(16));+ expect(title.style?.fontFamily, TextStyles.outfitFontFamily);- scrollController.jumpTo(54);+ scrollController.jumpTo(58);await tester.pump();final collapsedTitle = tester.widget<Text>(find.text('Menu items'));- expect(collapsedTitle.style?.fontSize, closeTo(18, 0.01));+ expect(collapsedTitle.style?.fontSize, closeTo(20, 0.01));+ expect(collapsedTitle.style?.fontFamily, TextStyles.outfitFontFamily);expect(tester.getTopLeft(find.text('Item 0')).dy, closeTo(56, 1));},);@@ -640,14 +643,15 @@ void main() {await tester.drag(find.byType(CustomScrollView), const Offset(0, -40));await tester.pumpAndSettle();- expect(scrollController.offset, closeTo(54, 1));+ expect(scrollController.offset, closeTo(58, 1));final collapsedTitle = tester.widget<Text>(find.text('Appearance'));- expect(collapsedTitle.style?.fontSize, closeTo(18, 0.01));+ expect(collapsedTitle.style?.fontSize, closeTo(20, 0.01));+ expect(collapsedTitle.style?.fontFamily, TextStyles.outfitFontFamily);expect(tester.getTopLeft(find.text('System theme')).dy, closeTo(56, 1));await tester.drag(find.byType(CustomScrollView), const Offset(0, 32));await tester.pumpAndSettle();- expect(scrollController.offset, closeTo(54, 1));+ expect(scrollController.offset, closeTo(58, 1));await tester.drag(find.byType(CustomScrollView), const Offset(0, 120));await tester.pumpAndSettle();@@ -725,7 +729,7 @@ void main() {expect(tester.takeException(), isNull);expect(find.text(title), findsOneWidget);- expect(tester.getBottomLeft(find.text(title)).dy, lessThanOrEqualTo(118));+ expect(tester.getBottomLeft(find.text(title)).dy, lessThanOrEqualTo(128));await tester.drag(find.byType(CustomScrollView), const Offset(0, -240));await tester.pump();diff --git a/mobile/packages/ente_components/test/theme/theme_tokens_test.dart b/mobile/packages/ente_components/test/theme/theme_tokens_test.dartindex 1dea07ee17..8784d04fb1 100644--- a/mobile/packages/ente_components/test/theme/theme_tokens_test.dart+++ b/mobile/packages/ente_components/test/theme/theme_tokens_test.dart@@ -239,6 +239,19 @@ void main() {group("text styles", () {test("match the published type scale", () {expect(TextStyles.fontFamily, "Inter");+ expect(TextStyles.outfitFontFamily, "Outfit");++ expect(TextStyles.display1.fontFamily, "Outfit");+ expect(TextStyles.display1.fontSize, 32);+ expect(TextStyles.display1.height, 40 / 32);+ expect(TextStyles.display1.fontWeight, FontWeight.w600);+ expect(TextStyles.display1.letterSpacing, 0);++ expect(TextStyles.display2.fontFamily, "Outfit");+ expect(TextStyles.display2.fontSize, 24);+ expect(TextStyles.display2.height, 32 / 24);+ expect(TextStyles.display2.fontWeight, FontWeight.w600);+ expect(TextStyles.display2.letterSpacing, 0);expect(TextStyles.h1.fontSize, 20);expect(TextStyles.h1.height, 28 / 20);@@ -249,6 +262,11 @@ void main() {expect(TextStyles.h2.height, 24 / 18);expect(TextStyles.h2.fontWeight, FontWeight.w600);+ expect(TextStyles.display3.fontFamily, "Outfit");+ expect(TextStyles.display3.fontSize, 20);+ expect(TextStyles.display3.height, 28 / 20);+ expect(TextStyles.display3.fontWeight, FontWeight.w600);+expect(TextStyles.body.fontSize, 14);expect(TextStyles.body.height, 20 / 14);expect(TextStyles.body.fontWeight, FontWeight.w500);