Skip to content

Commit 573f3ac

Browse files
authored
add feedback improvements (#2373)
2 parents 1f58af0 + 5a7ef8e commit 573f3ac

File tree

5 files changed

+81
-90
lines changed

5 files changed

+81
-90
lines changed

app/lib/pages/home/page.dart

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,16 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
183183
break;
184184
case "chat":
185185
homePageIdx = 1;
186-
case "apps":
186+
case "memoriesPage":
187187
homePageIdx = 2;
188188
break;
189-
case "memoriesPage":
189+
case "apps":
190190
homePageIdx = 3;
191191
break;
192192
}
193193
}
194194

195-
// Home controler
195+
// Home controller
196196
_controller = PageController(initialPage: homePageIdx);
197197
context.read<HomeProvider>().selectedIndex = homePageIdx;
198198
context.read<HomeProvider>().onSelectedIndexChanged = (index) {
@@ -378,8 +378,8 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
378378
children: const [
379379
ConversationsPage(),
380380
ChatPage(isPivotBottom: false),
381-
AppsPage(),
382381
MemoriesPage(),
382+
AppsPage(),
383383
],
384384
),
385385
),
@@ -415,7 +415,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
415415
indicatorPadding: EdgeInsets.zero,
416416
onTap: (index) {
417417
MixpanelManager()
418-
.bottomNavigationTabClicked(['Memories', 'Chat', 'Explore', 'Facts'][index]);
418+
.bottomNavigationTabClicked(['Memories', 'Chat', 'Facts', 'Explore'][index]);
419419
primaryFocus?.unfocus();
420420
if (home.selectedIndex == index) {
421421
return;
@@ -471,13 +471,13 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
471471
mainAxisSize: MainAxisSize.min,
472472
children: [
473473
Icon(
474-
FontAwesomeIcons.search,
474+
FontAwesomeIcons.brain,
475475
color: home.selectedIndex == 2 ? Colors.white : Colors.grey,
476476
size: 18,
477477
),
478478
const SizedBox(height: 6),
479479
Text(
480-
'Explore',
480+
'Memories',
481481
style: TextStyle(
482482
color: home.selectedIndex == 2 ? Colors.white : Colors.grey,
483483
fontSize: 12,
@@ -491,13 +491,13 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
491491
mainAxisSize: MainAxisSize.min,
492492
children: [
493493
Icon(
494-
FontAwesomeIcons.brain,
494+
FontAwesomeIcons.search,
495495
color: home.selectedIndex == 3 ? Colors.white : Colors.grey,
496496
size: 18,
497497
),
498498
const SizedBox(height: 6),
499499
Text(
500-
'Memories',
500+
'Explore',
501501
style: TextStyle(
502502
color: home.selectedIndex == 3 ? Colors.white : Colors.grey,
503503
fontSize: 12,
@@ -564,7 +564,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
564564
return Center(
565565
child: Padding(
566566
padding: EdgeInsets.only(right: MediaQuery.sizeOf(context).width * 0.10),
567-
child: const Text('Explore',
567+
child: const Text('Memories',
568568
style: TextStyle(
569569
color: Colors.white,
570570
fontSize: 22,
@@ -576,7 +576,7 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
576576
return Center(
577577
child: Padding(
578578
padding: EdgeInsets.only(right: MediaQuery.sizeOf(context).width * 0.10),
579-
child: const Text('Memories',
579+
child: const Text('Explore',
580580
style: TextStyle(
581581
color: Colors.white,
582582
fontSize: 22,
@@ -585,9 +585,9 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
585585
),
586586
);
587587
} else {
588-
return Expanded(
588+
return const Expanded(
589589
child: Center(
590-
child: const Text(
590+
child: Text(
591591
'',
592592
style: TextStyle(
593593
color: Colors.white,

app/lib/pages/memories/widgets/memory_item.dart

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import 'package:omi/utils/ui_guidelines.dart';
66
import 'package:omi/widgets/extensions/string.dart';
77

88
import 'delete_confirmation.dart';
9-
import 'category_chip.dart';
109

1110
class MemoryItem extends StatelessWidget {
1211
final Memory memory;
@@ -28,36 +27,21 @@ class MemoryItem extends StatelessWidget {
2827
onTap: () => onTap(context, memory, provider),
2928
child: Container(
3029
margin: const EdgeInsets.only(bottom: AppStyles.spacingM),
30+
padding: const EdgeInsets.symmetric(horizontal: AppStyles.spacingL, vertical: AppStyles.spacingL),
3131
decoration: AppStyles.cardDecoration,
32-
child: Column(
33-
crossAxisAlignment: CrossAxisAlignment.start,
32+
child: Row(
33+
crossAxisAlignment: CrossAxisAlignment.center,
3434
children: [
35-
Padding(
36-
padding: const EdgeInsets.all(AppStyles.spacingL),
37-
child: Column(
38-
crossAxisAlignment: CrossAxisAlignment.start,
39-
children: [
40-
Row(
41-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
42-
crossAxisAlignment: CrossAxisAlignment.center,
43-
children: [
44-
Expanded(
45-
child: CategoryChip(
46-
category: memory.category,
47-
showIcon: true,
48-
),
49-
),
50-
_buildVisibilityButton(context),
51-
],
52-
),
53-
const SizedBox(height: AppStyles.spacingM),
54-
Text(
55-
memory.content.decodeString,
56-
style: AppStyles.body,
57-
),
58-
],
35+
Expanded(
36+
child: Text(
37+
memory.content.decodeString,
38+
style: AppStyles.body,
39+
maxLines: 3,
40+
overflow: TextOverflow.ellipsis,
5941
),
6042
),
43+
const SizedBox(width: AppStyles.spacingM),
44+
_buildVisibilityButton(context),
6145
],
6246
),
6347
),
@@ -103,11 +87,11 @@ class MemoryItem extends StatelessWidget {
10387
),
10488
offset: const Offset(0, 4),
10589
child: Container(
106-
height: 26,
107-
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 0),
90+
height: 36,
91+
width: 56,
10892
decoration: BoxDecoration(
10993
color: Colors.white.withOpacity(0.1),
110-
borderRadius: BorderRadius.circular(AppStyles.radiusSmall),
94+
borderRadius: BorderRadius.circular(AppStyles.radiusMedium),
11195
),
11296
child: Row(
11397
mainAxisSize: MainAxisSize.min,
@@ -118,10 +102,10 @@ class MemoryItem extends StatelessWidget {
118102
size: 16,
119103
color: Colors.white70,
120104
),
121-
const SizedBox(width: 4),
105+
const SizedBox(width: 6),
122106
const Icon(
123107
Icons.keyboard_arrow_down,
124-
size: 16,
108+
size: 18,
125109
color: Colors.white70,
126110
),
127111
],
@@ -143,6 +127,7 @@ class MemoryItem extends StatelessWidget {
143127
],
144128
onSelected: (visibility) {
145129
provider.updateMemoryVisibility(memory, visibility);
130+
MixpanelManager().memoryVisibilityChanged(memory, visibility);
146131
},
147132
);
148133
}
@@ -178,13 +163,14 @@ class MemoryItem extends StatelessWidget {
178163
fontWeight: isSelected ? FontWeight.w600 : FontWeight.normal,
179164
),
180165
),
181-
const SizedBox(height: 2),
182166
Text(
183167
description,
184168
style: TextStyle(
185169
color: Colors.grey.shade400,
186170
fontSize: 12,
187171
),
172+
maxLines: 2,
173+
overflow: TextOverflow.ellipsis,
188174
),
189175
],
190176
),

app/lib/pages/memories/widgets/memory_review_sheet.dart

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,17 @@ class MemoriesReviewSheet extends StatelessWidget {
7070
borderRadius: BorderRadius.circular(10),
7171
),
7272
),
73-
onPressed: () => Navigator.pop(context),
73+
onPressed: () {
74+
Navigator.pop(context);
75+
Navigator.push(
76+
context,
77+
MaterialPageRoute(
78+
builder: (context) => MemoriesReviewPage(memories: memories),
79+
),
80+
);
81+
},
7482
child: Text(
75-
'Later',
83+
'Review Manually',
7684
style: TextStyle(
7785
color: Colors.grey.shade300,
7886
fontSize: 14,
@@ -91,16 +99,13 @@ class MemoriesReviewSheet extends StatelessWidget {
9199
),
92100
),
93101
onPressed: () {
102+
for (var memory in memories) {
103+
provider.reviewMemory(memory, true, 'review_sheet_accept_all');
104+
}
94105
Navigator.pop(context);
95-
Navigator.push(
96-
context,
97-
MaterialPageRoute(
98-
builder: (context) => MemoriesReviewPage(memories: memories),
99-
),
100-
);
101106
},
102107
child: const Text(
103-
'Review now',
108+
'Accept All',
104109
style: TextStyle(
105110
color: Colors.black,
106111
fontSize: 14,

app/lib/pages/settings/page.dart

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'package:omi/backend/auth.dart';
33
import 'package:omi/backend/preferences.dart';
44
import 'package:omi/main.dart';
55
import 'package:omi/pages/persona/persona_provider.dart';
6-
import 'package:omi/pages/persona/persona_profile.dart';
76
import 'package:omi/pages/settings/about.dart';
87
import 'package:omi/pages/settings/developer.dart';
98
import 'package:omi/pages/settings/profile.dart';
@@ -13,8 +12,6 @@ import 'package:omi/widgets/dialog.dart';
1312
import 'package:intercom_flutter/intercom_flutter.dart';
1413
import 'package:package_info_plus/package_info_plus.dart';
1514
import 'package:provider/provider.dart';
16-
import 'package:flutter_svg/flutter_svg.dart';
17-
import 'package:omi/gen/assets.gen.dart';
1815

1916
import 'device_settings.dart';
2017

@@ -71,26 +68,6 @@ class _SettingsPageState extends State<SettingsPage> {
7168
),
7269
const SizedBox(height: 12),
7370

74-
getItemAddOn2(
75-
'Persona',
76-
() {
77-
Navigator.of(context).push(
78-
MaterialPageRoute(
79-
builder: (context) => const PersonaProfilePage(),
80-
settings: const RouteSettings(
81-
arguments: 'from_settings',
82-
),
83-
),
84-
);
85-
},
86-
icon: SvgPicture.asset(
87-
Assets.images.icPersonaProfile.path,
88-
width: 24,
89-
height: 24,
90-
),
91-
),
92-
const SizedBox(height: 12),
93-
9471
// Device Settings
9572
getItemAddOn2(
9673
'Device Settings',

0 commit comments

Comments
 (0)