Skip to content

Commit c994317

Browse files
committed
action_sheet: Add DM action sheet
Fixes #1272. While working on the design update for the Inbox page, I noticed that we were well-prepared to implement the DM action sheet, including a way to show the participants of a group DM in the action sheet itself. For that, I've used a scrollable collection of user "chips" in the action-sheet header, with avatar, presence, and name. Discussion ongoing for whether we like this approach or prefer to put the users list on a separate page, as in issue #1534: https://chat.zulip.org/#narrow/channel/48-mobile/topic/abbreviated.20headings/near/2366774 In this commit, the action sheet can have up to two buttons: - "View profile", for 1:1 DMs - "Mark conversation as read", if there are unreads.
1 parent a098e87 commit c994317

27 files changed

+817
-3
lines changed

assets/l10n/app_en.arb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,29 @@
305305
"@actionSheetOptionCopyTopicLink": {
306306
"description": "Label for copy topic link button in action sheet."
307307
},
308+
"actionSheetTitleDm": "DMs with {user}",
309+
"@actionSheetTitleDm": {
310+
"description": "The title of an action sheet for a 1:1 DM conversation with another user.",
311+
"placeholders": {
312+
"user": {"type": "String", "example": "Alice"}
313+
}
314+
},
315+
"actionSheetTitleSelfDm": "DMs with yourself",
316+
"@actionSheetTitleSelfDm": {
317+
"description": "The title of an action sheet for the 1:1 DM conversation with yourself."
318+
},
319+
"actionSheetTitleGroupDm": "Group DM",
320+
"@actionSheetTitleGroupDm": {
321+
"description": "The title of an action sheet for a group DM conversation."
322+
},
323+
"actionSheetOptionViewProfile": "View profile",
324+
"@actionSheetOptionViewProfile": {
325+
"description": "Option to view the user's profile in the action sheet for a 1:1 DM conversation."
326+
},
327+
"actionSheetOptionMarkDmConversationAsRead": "Mark conversation as read",
328+
"@actionSheetOptionMarkDmConversationAsRead": {
329+
"description": "Option to mark a DM conversation as read in the action sheet."
330+
},
308331
"errorWebAuthOperationalErrorTitle": "Something went wrong",
309332
"@errorWebAuthOperationalErrorTitle": {
310333
"description": "Error title when third-party authentication has an operational error (not necessarily caused by invalid credentials)."

lib/generated/l10n/zulip_localizations.dart

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,36 @@ abstract class ZulipLocalizations {
575575
/// **'Copy link to topic'**
576576
String get actionSheetOptionCopyTopicLink;
577577

578+
/// The title of an action sheet for a 1:1 DM conversation with another user.
579+
///
580+
/// In en, this message translates to:
581+
/// **'DMs with {user}'**
582+
String actionSheetTitleDm(String user);
583+
584+
/// The title of an action sheet for the 1:1 DM conversation with yourself.
585+
///
586+
/// In en, this message translates to:
587+
/// **'DMs with yourself'**
588+
String get actionSheetTitleSelfDm;
589+
590+
/// The title of an action sheet for a group DM conversation.
591+
///
592+
/// In en, this message translates to:
593+
/// **'Group DM'**
594+
String get actionSheetTitleGroupDm;
595+
596+
/// Option to view the user's profile in the action sheet for a 1:1 DM conversation.
597+
///
598+
/// In en, this message translates to:
599+
/// **'View profile'**
600+
String get actionSheetOptionViewProfile;
601+
602+
/// Option to mark a DM conversation as read in the action sheet.
603+
///
604+
/// In en, this message translates to:
605+
/// **'Mark conversation as read'**
606+
String get actionSheetOptionMarkDmConversationAsRead;
607+
578608
/// Error title when third-party authentication has an operational error (not necessarily caused by invalid credentials).
579609
///
580610
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,24 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
259259
@override
260260
String get actionSheetOptionCopyTopicLink => 'Copy link to topic';
261261

262+
@override
263+
String actionSheetTitleDm(String user) {
264+
return 'DMs with $user';
265+
}
266+
267+
@override
268+
String get actionSheetTitleSelfDm => 'DMs with yourself';
269+
270+
@override
271+
String get actionSheetTitleGroupDm => 'Group DM';
272+
273+
@override
274+
String get actionSheetOptionViewProfile => 'View profile';
275+
276+
@override
277+
String get actionSheetOptionMarkDmConversationAsRead =>
278+
'Mark conversation as read';
279+
262280
@override
263281
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
264282

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,24 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
267267
@override
268268
String get actionSheetOptionCopyTopicLink => 'Link zum Thema kopieren';
269269

270+
@override
271+
String actionSheetTitleDm(String user) {
272+
return 'DMs with $user';
273+
}
274+
275+
@override
276+
String get actionSheetTitleSelfDm => 'DMs with yourself';
277+
278+
@override
279+
String get actionSheetTitleGroupDm => 'Group DM';
280+
281+
@override
282+
String get actionSheetOptionViewProfile => 'View profile';
283+
284+
@override
285+
String get actionSheetOptionMarkDmConversationAsRead =>
286+
'Mark conversation as read';
287+
270288
@override
271289
String get errorWebAuthOperationalErrorTitle => 'Etwas ist schiefgelaufen';
272290

lib/generated/l10n/zulip_localizations_el.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,24 @@ class ZulipLocalizationsEl extends ZulipLocalizations {
259259
@override
260260
String get actionSheetOptionCopyTopicLink => 'Copy link to topic';
261261

262+
@override
263+
String actionSheetTitleDm(String user) {
264+
return 'DMs with $user';
265+
}
266+
267+
@override
268+
String get actionSheetTitleSelfDm => 'DMs with yourself';
269+
270+
@override
271+
String get actionSheetTitleGroupDm => 'Group DM';
272+
273+
@override
274+
String get actionSheetOptionViewProfile => 'View profile';
275+
276+
@override
277+
String get actionSheetOptionMarkDmConversationAsRead =>
278+
'Mark conversation as read';
279+
262280
@override
263281
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
264282

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,24 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
259259
@override
260260
String get actionSheetOptionCopyTopicLink => 'Copy link to topic';
261261

262+
@override
263+
String actionSheetTitleDm(String user) {
264+
return 'DMs with $user';
265+
}
266+
267+
@override
268+
String get actionSheetTitleSelfDm => 'DMs with yourself';
269+
270+
@override
271+
String get actionSheetTitleGroupDm => 'Group DM';
272+
273+
@override
274+
String get actionSheetOptionViewProfile => 'View profile';
275+
276+
@override
277+
String get actionSheetOptionMarkDmConversationAsRead =>
278+
'Mark conversation as read';
279+
262280
@override
263281
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
264282

lib/generated/l10n/zulip_localizations_es.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,24 @@ class ZulipLocalizationsEs extends ZulipLocalizations {
259259
@override
260260
String get actionSheetOptionCopyTopicLink => 'Copy link to topic';
261261

262+
@override
263+
String actionSheetTitleDm(String user) {
264+
return 'DMs with $user';
265+
}
266+
267+
@override
268+
String get actionSheetTitleSelfDm => 'DMs with yourself';
269+
270+
@override
271+
String get actionSheetTitleGroupDm => 'Group DM';
272+
273+
@override
274+
String get actionSheetOptionViewProfile => 'View profile';
275+
276+
@override
277+
String get actionSheetOptionMarkDmConversationAsRead =>
278+
'Mark conversation as read';
279+
262280
@override
263281
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
264282

lib/generated/l10n/zulip_localizations_fr.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,24 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
269269
String get actionSheetOptionCopyTopicLink =>
270270
'Copier le lien vers cette conversation';
271271

272+
@override
273+
String actionSheetTitleDm(String user) {
274+
return 'DMs with $user';
275+
}
276+
277+
@override
278+
String get actionSheetTitleSelfDm => 'DMs with yourself';
279+
280+
@override
281+
String get actionSheetTitleGroupDm => 'Group DM';
282+
283+
@override
284+
String get actionSheetOptionViewProfile => 'View profile';
285+
286+
@override
287+
String get actionSheetOptionMarkDmConversationAsRead =>
288+
'Mark conversation as read';
289+
272290
@override
273291
String get errorWebAuthOperationalErrorTitle => 'Une erreur s\'est produite';
274292

lib/generated/l10n/zulip_localizations_he.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,24 @@ class ZulipLocalizationsHe extends ZulipLocalizations {
259259
@override
260260
String get actionSheetOptionCopyTopicLink => 'Copy link to topic';
261261

262+
@override
263+
String actionSheetTitleDm(String user) {
264+
return 'DMs with $user';
265+
}
266+
267+
@override
268+
String get actionSheetTitleSelfDm => 'DMs with yourself';
269+
270+
@override
271+
String get actionSheetTitleGroupDm => 'Group DM';
272+
273+
@override
274+
String get actionSheetOptionViewProfile => 'View profile';
275+
276+
@override
277+
String get actionSheetOptionMarkDmConversationAsRead =>
278+
'Mark conversation as read';
279+
262280
@override
263281
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
264282

lib/generated/l10n/zulip_localizations_hu.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,24 @@ class ZulipLocalizationsHu extends ZulipLocalizations {
259259
@override
260260
String get actionSheetOptionCopyTopicLink => 'Copy link to topic';
261261

262+
@override
263+
String actionSheetTitleDm(String user) {
264+
return 'DMs with $user';
265+
}
266+
267+
@override
268+
String get actionSheetTitleSelfDm => 'DMs with yourself';
269+
270+
@override
271+
String get actionSheetTitleGroupDm => 'Group DM';
272+
273+
@override
274+
String get actionSheetOptionViewProfile => 'View profile';
275+
276+
@override
277+
String get actionSheetOptionMarkDmConversationAsRead =>
278+
'Mark conversation as read';
279+
262280
@override
263281
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
264282

0 commit comments

Comments
 (0)