Skip to content

Commit b6254ea

Browse files
new-dm: Add UI for starting new DM conversations
Add a modal bottom sheet UI for starting direct messages: - Search and select users from global list - Support single and group DMs - Navigate to message list after selection Design reference: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=4903-31879&p=f&t=pQP4QcxpccllCF7g-0 Fixes: #127 Co-authored-by: Chris Bobbe <[email protected]>
1 parent 3cced6c commit b6254ea

19 files changed

+931
-108
lines changed

assets/l10n/app_en.arb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -409,13 +409,9 @@
409409
"@composeBoxGenericContentHint": {
410410
"description": "Hint text for content input when sending a message."
411411
},
412-
"newDmSheetBackButtonLabel": "Back",
413-
"@newDmSheetBackButtonLabel": {
414-
"description": "Label for the back button in the new DM sheet, allowing the user to return to the previous screen."
415-
},
416-
"newDmSheetNextButtonLabel": "Next",
417-
"@newDmSheetNextButtonLabel": {
418-
"description": "Label for the front button in the new DM sheet, if applicable, for navigation or action."
412+
"newDmSheetComposeButtonLabel": "Compose",
413+
"@newDmSheetComposeButtonLabel": {
414+
"description": "Label for the compose button in the new DM sheet that starts composing a message to the selected users."
419415
},
420416
"newDmSheetScreenTitle": "New DM",
421417
"@newDmSheetScreenTitle": {
@@ -431,7 +427,7 @@
431427
},
432428
"newDmSheetSearchHintSomeSelected": "Add another user…",
433429
"@newDmSheetSearchHintSomeSelected": {
434-
"description": "Hint text for the search bar when at least one user is selected"
430+
"description": "Hint text for the search bar when at least one user is selected."
435431
},
436432
"newDmSheetNoUsersFound": "No users found",
437433
"@newDmSheetNoUsersFound": {

lib/generated/l10n/zulip_localizations.dart

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -691,17 +691,11 @@ abstract class ZulipLocalizations {
691691
/// **'Type a message'**
692692
String get composeBoxGenericContentHint;
693693

694-
/// Label for the back button in the new DM sheet, allowing the user to return to the previous screen.
694+
/// Label for the compose button in the new DM sheet that starts composing a message to the selected users.
695695
///
696696
/// In en, this message translates to:
697-
/// **'Back'**
698-
String get newDmSheetBackButtonLabel;
699-
700-
/// Label for the front button in the new DM sheet, if applicable, for navigation or action.
701-
///
702-
/// In en, this message translates to:
703-
/// **'Next'**
704-
String get newDmSheetNextButtonLabel;
697+
/// **'Compose'**
698+
String get newDmSheetComposeButtonLabel;
705699

706700
/// Title displayed at the top of the new DM screen.
707701
///
@@ -721,7 +715,7 @@ abstract class ZulipLocalizations {
721715
/// **'Add one or more users'**
722716
String get newDmSheetSearchHintEmpty;
723717

724-
/// Hint text for the search bar when at least one user is selected
718+
/// Hint text for the search bar when at least one user is selected.
725719
///
726720
/// In en, this message translates to:
727721
/// **'Add another user…'**

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
344344
String get composeBoxGenericContentHint => 'Type a message';
345345

346346
@override
347-
String get newDmSheetBackButtonLabel => 'Back';
348-
349-
@override
350-
String get newDmSheetNextButtonLabel => 'Next';
347+
String get newDmSheetComposeButtonLabel => 'Compose';
351348

352349
@override
353350
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,7 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
344344
String get composeBoxGenericContentHint => 'Type a message';
345345

346346
@override
347-
String get newDmSheetBackButtonLabel => 'Back';
348-
349-
@override
350-
String get newDmSheetNextButtonLabel => 'Next';
347+
String get newDmSheetComposeButtonLabel => 'Compose';
351348

352349
@override
353350
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
344344
String get composeBoxGenericContentHint => 'Type a message';
345345

346346
@override
347-
String get newDmSheetBackButtonLabel => 'Back';
348-
349-
@override
350-
String get newDmSheetNextButtonLabel => 'Next';
347+
String get newDmSheetComposeButtonLabel => 'Compose';
351348

352349
@override
353350
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,7 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
344344
String get composeBoxGenericContentHint => 'Type a message';
345345

346346
@override
347-
String get newDmSheetBackButtonLabel => 'Back';
348-
349-
@override
350-
String get newDmSheetNextButtonLabel => 'Next';
347+
String get newDmSheetComposeButtonLabel => 'Compose';
351348

352349
@override
353350
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
344344
String get composeBoxGenericContentHint => 'Type a message';
345345

346346
@override
347-
String get newDmSheetBackButtonLabel => 'Back';
348-
349-
@override
350-
String get newDmSheetNextButtonLabel => 'Next';
347+
String get newDmSheetComposeButtonLabel => 'Compose';
351348

352349
@override
353350
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,7 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
351351
String get composeBoxGenericContentHint => 'Wpisz wiadomość';
352352

353353
@override
354-
String get newDmSheetBackButtonLabel => 'Back';
355-
356-
@override
357-
String get newDmSheetNextButtonLabel => 'Next';
354+
String get newDmSheetComposeButtonLabel => 'Compose';
358355

359356
@override
360357
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,7 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
352352
String get composeBoxGenericContentHint => 'Ввести сообщение';
353353

354354
@override
355-
String get newDmSheetBackButtonLabel => 'Back';
356-
357-
@override
358-
String get newDmSheetNextButtonLabel => 'Next';
355+
String get newDmSheetComposeButtonLabel => 'Compose';
359356

360357
@override
361358
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_sk.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,7 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
344344
String get composeBoxGenericContentHint => 'Type a message';
345345

346346
@override
347-
String get newDmSheetBackButtonLabel => 'Back';
348-
349-
@override
350-
String get newDmSheetNextButtonLabel => 'Next';
347+
String get newDmSheetComposeButtonLabel => 'Compose';
351348

352349
@override
353350
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_uk.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,10 +353,7 @@ class ZulipLocalizationsUk extends ZulipLocalizations {
353353
String get composeBoxGenericContentHint => 'Ввести повідомлення';
354354

355355
@override
356-
String get newDmSheetBackButtonLabel => 'Back';
357-
358-
@override
359-
String get newDmSheetNextButtonLabel => 'Next';
356+
String get newDmSheetComposeButtonLabel => 'Compose';
360357

361358
@override
362359
String get newDmSheetScreenTitle => 'New DM';

lib/generated/l10n/zulip_localizations_zh.dart

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,10 +344,7 @@ class ZulipLocalizationsZh extends ZulipLocalizations {
344344
String get composeBoxGenericContentHint => 'Type a message';
345345

346346
@override
347-
String get newDmSheetBackButtonLabel => 'Back';
348-
349-
@override
350-
String get newDmSheetNextButtonLabel => 'Next';
347+
String get newDmSheetComposeButtonLabel => 'Compose';
351348

352349
@override
353350
String get newDmSheetScreenTitle => 'New DM';

lib/model/autocomplete.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,6 @@ class MentionAutocompleteView extends AutocompleteView<MentionAutocompleteQuery,
556556
/// returns a positive number if [userB] is more recent than [userA],
557557
/// and returns `0` if both [userA] and [userB] are equally recent
558558
/// or there is no DM exchanged with them whatsoever.
559-
@visibleForTesting
560559
static int compareByDms(User userA, User userB, {required PerAccountStore store}) {
561560
final recentDms = store.recentDmConversationsView;
562561
final aLatestMessageId = recentDms.latestMessagesByRecipient[userA.userId];

lib/widgets/icons.dart

Lines changed: 42 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -48,113 +48,119 @@ abstract final class ZulipIcons {
4848
/// The Zulip custom icon "check".
4949
static const IconData check = IconData(0xf108, fontFamily: "Zulip Icons");
5050

51+
/// The Zulip custom icon "check_circle_checked".
52+
static const IconData check_circle_checked = IconData(0xf109, fontFamily: "Zulip Icons");
53+
54+
/// The Zulip custom icon "check_circle_unchecked".
55+
static const IconData check_circle_unchecked = IconData(0xf10a, fontFamily: "Zulip Icons");
56+
5157
/// The Zulip custom icon "check_remove".
52-
static const IconData check_remove = IconData(0xf109, fontFamily: "Zulip Icons");
58+
static const IconData check_remove = IconData(0xf10b, fontFamily: "Zulip Icons");
5359

5460
/// The Zulip custom icon "chevron_right".
55-
static const IconData chevron_right = IconData(0xf10a, fontFamily: "Zulip Icons");
61+
static const IconData chevron_right = IconData(0xf10c, fontFamily: "Zulip Icons");
5662

5763
/// The Zulip custom icon "clock".
58-
static const IconData clock = IconData(0xf10b, fontFamily: "Zulip Icons");
64+
static const IconData clock = IconData(0xf10d, fontFamily: "Zulip Icons");
5965

6066
/// The Zulip custom icon "contacts".
61-
static const IconData contacts = IconData(0xf10c, fontFamily: "Zulip Icons");
67+
static const IconData contacts = IconData(0xf10e, fontFamily: "Zulip Icons");
6268

6369
/// The Zulip custom icon "copy".
64-
static const IconData copy = IconData(0xf10d, fontFamily: "Zulip Icons");
70+
static const IconData copy = IconData(0xf10f, fontFamily: "Zulip Icons");
6571

6672
/// The Zulip custom icon "edit".
67-
static const IconData edit = IconData(0xf10e, fontFamily: "Zulip Icons");
73+
static const IconData edit = IconData(0xf110, fontFamily: "Zulip Icons");
6874

6975
/// The Zulip custom icon "follow".
70-
static const IconData follow = IconData(0xf10f, fontFamily: "Zulip Icons");
76+
static const IconData follow = IconData(0xf111, fontFamily: "Zulip Icons");
7177

7278
/// The Zulip custom icon "format_quote".
73-
static const IconData format_quote = IconData(0xf110, fontFamily: "Zulip Icons");
79+
static const IconData format_quote = IconData(0xf112, fontFamily: "Zulip Icons");
7480

7581
/// The Zulip custom icon "globe".
76-
static const IconData globe = IconData(0xf111, fontFamily: "Zulip Icons");
82+
static const IconData globe = IconData(0xf113, fontFamily: "Zulip Icons");
7783

7884
/// The Zulip custom icon "group_dm".
79-
static const IconData group_dm = IconData(0xf112, fontFamily: "Zulip Icons");
85+
static const IconData group_dm = IconData(0xf114, fontFamily: "Zulip Icons");
8086

8187
/// The Zulip custom icon "hash_italic".
82-
static const IconData hash_italic = IconData(0xf113, fontFamily: "Zulip Icons");
88+
static const IconData hash_italic = IconData(0xf115, fontFamily: "Zulip Icons");
8389

8490
/// The Zulip custom icon "hash_sign".
85-
static const IconData hash_sign = IconData(0xf114, fontFamily: "Zulip Icons");
91+
static const IconData hash_sign = IconData(0xf116, fontFamily: "Zulip Icons");
8692

8793
/// The Zulip custom icon "image".
88-
static const IconData image = IconData(0xf115, fontFamily: "Zulip Icons");
94+
static const IconData image = IconData(0xf117, fontFamily: "Zulip Icons");
8995

9096
/// The Zulip custom icon "inbox".
91-
static const IconData inbox = IconData(0xf116, fontFamily: "Zulip Icons");
97+
static const IconData inbox = IconData(0xf118, fontFamily: "Zulip Icons");
9298

9399
/// The Zulip custom icon "info".
94-
static const IconData info = IconData(0xf117, fontFamily: "Zulip Icons");
100+
static const IconData info = IconData(0xf119, fontFamily: "Zulip Icons");
95101

96102
/// The Zulip custom icon "inherit".
97-
static const IconData inherit = IconData(0xf118, fontFamily: "Zulip Icons");
103+
static const IconData inherit = IconData(0xf11a, fontFamily: "Zulip Icons");
98104

99105
/// The Zulip custom icon "language".
100-
static const IconData language = IconData(0xf119, fontFamily: "Zulip Icons");
106+
static const IconData language = IconData(0xf11b, fontFamily: "Zulip Icons");
101107

102108
/// The Zulip custom icon "lock".
103-
static const IconData lock = IconData(0xf11a, fontFamily: "Zulip Icons");
109+
static const IconData lock = IconData(0xf11c, fontFamily: "Zulip Icons");
104110

105111
/// The Zulip custom icon "menu".
106-
static const IconData menu = IconData(0xf11b, fontFamily: "Zulip Icons");
112+
static const IconData menu = IconData(0xf11d, fontFamily: "Zulip Icons");
107113

108114
/// The Zulip custom icon "message_checked".
109-
static const IconData message_checked = IconData(0xf11c, fontFamily: "Zulip Icons");
115+
static const IconData message_checked = IconData(0xf11e, fontFamily: "Zulip Icons");
110116

111117
/// The Zulip custom icon "message_feed".
112-
static const IconData message_feed = IconData(0xf11d, fontFamily: "Zulip Icons");
118+
static const IconData message_feed = IconData(0xf11f, fontFamily: "Zulip Icons");
113119

114120
/// The Zulip custom icon "mute".
115-
static const IconData mute = IconData(0xf11e, fontFamily: "Zulip Icons");
121+
static const IconData mute = IconData(0xf120, fontFamily: "Zulip Icons");
116122

117123
/// The Zulip custom icon "plus".
118-
static const IconData plus = IconData(0xf11f, fontFamily: "Zulip Icons");
124+
static const IconData plus = IconData(0xf121, fontFamily: "Zulip Icons");
119125

120126
/// The Zulip custom icon "read_receipts".
121-
static const IconData read_receipts = IconData(0xf120, fontFamily: "Zulip Icons");
127+
static const IconData read_receipts = IconData(0xf122, fontFamily: "Zulip Icons");
122128

123129
/// The Zulip custom icon "send".
124-
static const IconData send = IconData(0xf121, fontFamily: "Zulip Icons");
130+
static const IconData send = IconData(0xf123, fontFamily: "Zulip Icons");
125131

126132
/// The Zulip custom icon "settings".
127-
static const IconData settings = IconData(0xf122, fontFamily: "Zulip Icons");
133+
static const IconData settings = IconData(0xf124, fontFamily: "Zulip Icons");
128134

129135
/// The Zulip custom icon "share".
130-
static const IconData share = IconData(0xf123, fontFamily: "Zulip Icons");
136+
static const IconData share = IconData(0xf125, fontFamily: "Zulip Icons");
131137

132138
/// The Zulip custom icon "share_ios".
133-
static const IconData share_ios = IconData(0xf124, fontFamily: "Zulip Icons");
139+
static const IconData share_ios = IconData(0xf126, fontFamily: "Zulip Icons");
134140

135141
/// The Zulip custom icon "smile".
136-
static const IconData smile = IconData(0xf125, fontFamily: "Zulip Icons");
142+
static const IconData smile = IconData(0xf127, fontFamily: "Zulip Icons");
137143

138144
/// The Zulip custom icon "star".
139-
static const IconData star = IconData(0xf126, fontFamily: "Zulip Icons");
145+
static const IconData star = IconData(0xf128, fontFamily: "Zulip Icons");
140146

141147
/// The Zulip custom icon "star_filled".
142-
static const IconData star_filled = IconData(0xf127, fontFamily: "Zulip Icons");
148+
static const IconData star_filled = IconData(0xf129, fontFamily: "Zulip Icons");
143149

144150
/// The Zulip custom icon "three_person".
145-
static const IconData three_person = IconData(0xf128, fontFamily: "Zulip Icons");
151+
static const IconData three_person = IconData(0xf12a, fontFamily: "Zulip Icons");
146152

147153
/// The Zulip custom icon "topic".
148-
static const IconData topic = IconData(0xf129, fontFamily: "Zulip Icons");
154+
static const IconData topic = IconData(0xf12b, fontFamily: "Zulip Icons");
149155

150156
/// The Zulip custom icon "topics".
151-
static const IconData topics = IconData(0xf12a, fontFamily: "Zulip Icons");
157+
static const IconData topics = IconData(0xf12c, fontFamily: "Zulip Icons");
152158

153159
/// The Zulip custom icon "unmute".
154-
static const IconData unmute = IconData(0xf12b, fontFamily: "Zulip Icons");
160+
static const IconData unmute = IconData(0xf12d, fontFamily: "Zulip Icons");
155161

156162
/// The Zulip custom icon "user".
157-
static const IconData user = IconData(0xf12c, fontFamily: "Zulip Icons");
163+
static const IconData user = IconData(0xf12e, fontFamily: "Zulip Icons");
158164

159165
// END GENERATED ICON DATA
160166
}

0 commit comments

Comments
 (0)