Skip to content

Commit fd5b9a3

Browse files
committed
action_sheet: Prefix channel name with "#" in a confirmation dialog title
See Alya's feedback on zulip#1890: zulip#1890 (comment) > In general, our pattern is to always show a privacy marker or (if > not convenient) a `#` before a channel name. It can be a separate > PR, but can we add that to these confirmation dialogs? Doing this in code, rather than in the translators' source string, because we don't want it to vary by language.
1 parent aaff63f commit fd5b9a3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

assets/l10n/app_en.arb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
"@unsubscribeConfirmationDialogTitle": {
141141
"description": "Title for a confirmation dialog for unsubscribing from a channel.",
142142
"placeholders": {
143-
"channelName": {"type": "String", "example": "mobile"}
143+
"channelName": {"type": "String", "example": "#mobile"}
144144
}
145145
},
146146
"unsubscribeConfirmationDialogMessageCannotResubscribe": "Once you leave this channel, you will not be able to rejoin.",

lib/widgets/action_sheet.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ class UnsubscribeButton extends ActionSheetMenuItemButton {
647647
final zulipLocalizations = ZulipLocalizations.of(pageContext);
648648

649649
final dialog = showSuggestedActionDialog(context: pageContext,
650-
title: zulipLocalizations.unsubscribeConfirmationDialogTitle(subscription.name),
650+
title: zulipLocalizations.unsubscribeConfirmationDialogTitle('#${subscription.name}'),
651651
message: zulipLocalizations.unsubscribeConfirmationDialogMessageCannotResubscribe,
652652
destructiveActionButton: true,
653653
actionButtonText: zulipLocalizations.unsubscribeConfirmationDialogConfirmButton);

test/widgets/action_sheet_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ void main() {
599599
await tester.pump();
600600

601601
final (unsubscribeButton, cancelButton) = checkSuggestedActionDialog(tester,
602-
expectedTitle: 'Unsubscribe from ${channel.name}?',
602+
expectedTitle: 'Unsubscribe from #${channel.name}?',
603603
expectedMessage: 'Once you leave this channel, you will not be able to rejoin.',
604604
expectDestructiveActionButton: true,
605605
expectedActionButtonText: 'Unsubscribe');

0 commit comments

Comments
 (0)