Skip to content

new_dm: Add UI for starting new DM conversations #1322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions assets/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -409,13 +409,9 @@
"@composeBoxGenericContentHint": {
"description": "Hint text for content input when sending a message."
},
"newDmSheetBackButtonLabel": "Back",
"@newDmSheetBackButtonLabel": {
"description": "Label for the back button in the new DM sheet, allowing the user to return to the previous screen."
},
"newDmSheetNextButtonLabel": "Next",
"@newDmSheetNextButtonLabel": {
"description": "Label for the front button in the new DM sheet, if applicable, for navigation or action."
"newDmSheetComposeButtonLabel": "Compose",
"@newDmSheetComposeButtonLabel": {
"description": "Label for the compose button in the new DM sheet that starts composing a message to the selected users."
},
"newDmSheetScreenTitle": "New DM",
"@newDmSheetScreenTitle": {
Expand All @@ -431,7 +427,7 @@
},
"newDmSheetSearchHintSomeSelected": "Add another user…",
"@newDmSheetSearchHintSomeSelected": {
"description": "Hint text for the search bar when at least one user is selected"
"description": "Hint text for the search bar when at least one user is selected."
},
"newDmSheetNoUsersFound": "No users found",
"@newDmSheetNoUsersFound": {
Expand Down
14 changes: 4 additions & 10 deletions lib/generated/l10n/zulip_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -691,17 +691,11 @@ abstract class ZulipLocalizations {
/// **'Type a message'**
String get composeBoxGenericContentHint;

/// Label for the back button in the new DM sheet, allowing the user to return to the previous screen.
/// Label for the compose button in the new DM sheet that starts composing a message to the selected users.
///
/// In en, this message translates to:
/// **'Back'**
String get newDmSheetBackButtonLabel;

/// Label for the front button in the new DM sheet, if applicable, for navigation or action.
///
/// In en, this message translates to:
/// **'Next'**
String get newDmSheetNextButtonLabel;
/// **'Compose'**
String get newDmSheetComposeButtonLabel;

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

/// Hint text for the search bar when at least one user is selected
/// Hint text for the search bar when at least one user is selected.
///
/// In en, this message translates to:
/// **'Add another user…'**
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_ar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_de.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_ja.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_nb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_pl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,7 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Wpisz wiadomość';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,7 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Ввести сообщение';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_sk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_uk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,7 @@ class ZulipLocalizationsUk extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Ввести повідомлення';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
5 changes: 1 addition & 4 deletions lib/generated/l10n/zulip_localizations_zh.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,7 @@ class ZulipLocalizationsZh extends ZulipLocalizations {
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';
String get newDmSheetComposeButtonLabel => 'Compose';

@override
String get newDmSheetScreenTitle => 'New DM';
Expand Down
1 change: 0 additions & 1 deletion lib/model/autocomplete.dart
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,6 @@ class MentionAutocompleteView extends AutocompleteView<MentionAutocompleteQuery,
/// returns a positive number if [userB] is more recent than [userA],
/// and returns `0` if both [userA] and [userB] are equally recent
/// or there is no DM exchanged with them whatsoever.
@visibleForTesting
static int compareByDms(User userA, User userB, {required PerAccountStore store}) {
final recentDms = store.recentDmConversationsView;
final aLatestMessageId = recentDms.latestMessagesByRecipient[userA.userId];
Expand Down
Loading