Skip to content

Commit 00f1799

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 a58f9e7 commit 00f1799

27 files changed

+813
-2
lines changed

assets/l10n/app_en.arb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,29 @@
321321
"@actionSheetOptionCopyTopicLink": {
322322
"description": "Label for copy topic link button in action sheet."
323323
},
324+
"actionSheetTitleDm": "DMs with {user}",
325+
"@actionSheetTitleDm": {
326+
"description": "The title of an action sheet for a 1:1 DM conversation with another user.",
327+
"placeholders": {
328+
"user": {"type": "String", "example": "Alice"}
329+
}
330+
},
331+
"actionSheetTitleSelfDm": "DMs with yourself",
332+
"@actionSheetTitleSelfDm": {
333+
"description": "The title of an action sheet for the 1:1 DM conversation with yourself."
334+
},
335+
"actionSheetTitleGroupDm": "Group DM",
336+
"@actionSheetTitleGroupDm": {
337+
"description": "The title of an action sheet for a group DM conversation."
338+
},
339+
"actionSheetOptionViewProfile": "View profile",
340+
"@actionSheetOptionViewProfile": {
341+
"description": "Option to view the user's profile in the action sheet for a 1:1 DM conversation."
342+
},
343+
"actionSheetOptionMarkDmConversationAsRead": "Mark conversation as read",
344+
"@actionSheetOptionMarkDmConversationAsRead": {
345+
"description": "Option to mark a DM conversation as read in the action sheet."
346+
},
324347
"errorWebAuthOperationalErrorTitle": "Something went wrong",
325348
"@errorWebAuthOperationalErrorTitle": {
326349
"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
@@ -599,6 +599,36 @@ abstract class ZulipLocalizations {
599599
/// **'Copy link to topic'**
600600
String get actionSheetOptionCopyTopicLink;
601601

602+
/// The title of an action sheet for a 1:1 DM conversation with another user.
603+
///
604+
/// In en, this message translates to:
605+
/// **'DMs with {user}'**
606+
String actionSheetTitleDm(String user);
607+
608+
/// The title of an action sheet for the 1:1 DM conversation with yourself.
609+
///
610+
/// In en, this message translates to:
611+
/// **'DMs with yourself'**
612+
String get actionSheetTitleSelfDm;
613+
614+
/// The title of an action sheet for a group DM conversation.
615+
///
616+
/// In en, this message translates to:
617+
/// **'Group DM'**
618+
String get actionSheetTitleGroupDm;
619+
620+
/// Option to view the user's profile in the action sheet for a 1:1 DM conversation.
621+
///
622+
/// In en, this message translates to:
623+
/// **'View profile'**
624+
String get actionSheetOptionViewProfile;
625+
626+
/// Option to mark a DM conversation as read in the action sheet.
627+
///
628+
/// In en, this message translates to:
629+
/// **'Mark conversation as read'**
630+
String get actionSheetOptionMarkDmConversationAsRead;
631+
602632
/// Error title when third-party authentication has an operational error (not necessarily caused by invalid credentials).
603633
///
604634
/// 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
@@ -271,6 +271,24 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
271271
@override
272272
String get actionSheetOptionCopyTopicLink => 'Copy link to topic';
273273

274+
@override
275+
String actionSheetTitleDm(String user) {
276+
return 'DMs with $user';
277+
}
278+
279+
@override
280+
String get actionSheetTitleSelfDm => 'DMs with yourself';
281+
282+
@override
283+
String get actionSheetTitleGroupDm => 'Group DM';
284+
285+
@override
286+
String get actionSheetOptionViewProfile => 'View profile';
287+
288+
@override
289+
String get actionSheetOptionMarkDmConversationAsRead =>
290+
'Mark conversation as read';
291+
274292
@override
275293
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
276294

lib/generated/l10n/zulip_localizations_de.dart

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

282+
@override
283+
String actionSheetTitleDm(String user) {
284+
return 'DMs with $user';
285+
}
286+
287+
@override
288+
String get actionSheetTitleSelfDm => 'DMs with yourself';
289+
290+
@override
291+
String get actionSheetTitleGroupDm => 'Group DM';
292+
293+
@override
294+
String get actionSheetOptionViewProfile => 'View profile';
295+
296+
@override
297+
String get actionSheetOptionMarkDmConversationAsRead =>
298+
'Mark conversation as read';
299+
282300
@override
283301
String get errorWebAuthOperationalErrorTitle => 'Etwas ist schiefgelaufen';
284302

lib/generated/l10n/zulip_localizations_el.dart

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

274+
@override
275+
String actionSheetTitleDm(String user) {
276+
return 'DMs with $user';
277+
}
278+
279+
@override
280+
String get actionSheetTitleSelfDm => 'DMs with yourself';
281+
282+
@override
283+
String get actionSheetTitleGroupDm => 'Group DM';
284+
285+
@override
286+
String get actionSheetOptionViewProfile => 'View profile';
287+
288+
@override
289+
String get actionSheetOptionMarkDmConversationAsRead =>
290+
'Mark conversation as read';
291+
274292
@override
275293
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
276294

lib/generated/l10n/zulip_localizations_en.dart

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

274+
@override
275+
String actionSheetTitleDm(String user) {
276+
return 'DMs with $user';
277+
}
278+
279+
@override
280+
String get actionSheetTitleSelfDm => 'DMs with yourself';
281+
282+
@override
283+
String get actionSheetTitleGroupDm => 'Group DM';
284+
285+
@override
286+
String get actionSheetOptionViewProfile => 'View profile';
287+
288+
@override
289+
String get actionSheetOptionMarkDmConversationAsRead =>
290+
'Mark conversation as read';
291+
274292
@override
275293
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
276294

lib/generated/l10n/zulip_localizations_es.dart

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

274+
@override
275+
String actionSheetTitleDm(String user) {
276+
return 'DMs with $user';
277+
}
278+
279+
@override
280+
String get actionSheetTitleSelfDm => 'DMs with yourself';
281+
282+
@override
283+
String get actionSheetTitleGroupDm => 'Group DM';
284+
285+
@override
286+
String get actionSheetOptionViewProfile => 'View profile';
287+
288+
@override
289+
String get actionSheetOptionMarkDmConversationAsRead =>
290+
'Mark conversation as read';
291+
274292
@override
275293
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
276294

lib/generated/l10n/zulip_localizations_fr.dart

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

284+
@override
285+
String actionSheetTitleDm(String user) {
286+
return 'DMs with $user';
287+
}
288+
289+
@override
290+
String get actionSheetTitleSelfDm => 'DMs with yourself';
291+
292+
@override
293+
String get actionSheetTitleGroupDm => 'Group DM';
294+
295+
@override
296+
String get actionSheetOptionViewProfile => 'View profile';
297+
298+
@override
299+
String get actionSheetOptionMarkDmConversationAsRead =>
300+
'Mark conversation as read';
301+
284302
@override
285303
String get errorWebAuthOperationalErrorTitle => 'Une erreur s\'est produite';
286304

lib/generated/l10n/zulip_localizations_he.dart

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

274+
@override
275+
String actionSheetTitleDm(String user) {
276+
return 'DMs with $user';
277+
}
278+
279+
@override
280+
String get actionSheetTitleSelfDm => 'DMs with yourself';
281+
282+
@override
283+
String get actionSheetTitleGroupDm => 'Group DM';
284+
285+
@override
286+
String get actionSheetOptionViewProfile => 'View profile';
287+
288+
@override
289+
String get actionSheetOptionMarkDmConversationAsRead =>
290+
'Mark conversation as read';
291+
274292
@override
275293
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
276294

lib/generated/l10n/zulip_localizations_hu.dart

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

274+
@override
275+
String actionSheetTitleDm(String user) {
276+
return 'DMs with $user';
277+
}
278+
279+
@override
280+
String get actionSheetTitleSelfDm => 'DMs with yourself';
281+
282+
@override
283+
String get actionSheetTitleGroupDm => 'Group DM';
284+
285+
@override
286+
String get actionSheetOptionViewProfile => 'View profile';
287+
288+
@override
289+
String get actionSheetOptionMarkDmConversationAsRead =>
290+
'Mark conversation as read';
291+
274292
@override
275293
String get errorWebAuthOperationalErrorTitle => 'Something went wrong';
276294

0 commit comments

Comments
 (0)