Skip to content

new-dm: Add UI for starting new DM conversation (Chris's revision) #1554

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

Merged
merged 5 commits into from
Jun 12, 2025
Merged
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
Binary file modified assets/icons/ZulipIcons.ttf
Binary file not shown.
3 changes: 3 additions & 0 deletions assets/icons/check_circle_checked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/check_circle_unchecked.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/icons/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
79 changes: 44 additions & 35 deletions lib/widgets/icons.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,110 +48,119 @@ abstract final class ZulipIcons {
/// The Zulip custom icon "check".
static const IconData check = IconData(0xf108, fontFamily: "Zulip Icons");

/// The Zulip custom icon "check_circle_checked".
static const IconData check_circle_checked = IconData(0xf109, fontFamily: "Zulip Icons");

/// The Zulip custom icon "check_circle_unchecked".
static const IconData check_circle_unchecked = IconData(0xf10a, fontFamily: "Zulip Icons");
Comment on lines +51 to +55
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this diff happens in the commit after the one that adds the icons


/// The Zulip custom icon "check_remove".
static const IconData check_remove = IconData(0xf109, fontFamily: "Zulip Icons");
static const IconData check_remove = IconData(0xf10b, fontFamily: "Zulip Icons");

/// The Zulip custom icon "chevron_right".
static const IconData chevron_right = IconData(0xf10a, fontFamily: "Zulip Icons");
static const IconData chevron_right = IconData(0xf10c, fontFamily: "Zulip Icons");

/// The Zulip custom icon "clock".
static const IconData clock = IconData(0xf10b, fontFamily: "Zulip Icons");
static const IconData clock = IconData(0xf10d, fontFamily: "Zulip Icons");

/// The Zulip custom icon "contacts".
static const IconData contacts = IconData(0xf10c, fontFamily: "Zulip Icons");
static const IconData contacts = IconData(0xf10e, fontFamily: "Zulip Icons");

/// The Zulip custom icon "copy".
static const IconData copy = IconData(0xf10d, fontFamily: "Zulip Icons");
static const IconData copy = IconData(0xf10f, fontFamily: "Zulip Icons");

/// The Zulip custom icon "edit".
static const IconData edit = IconData(0xf10e, fontFamily: "Zulip Icons");
static const IconData edit = IconData(0xf110, fontFamily: "Zulip Icons");

/// The Zulip custom icon "follow".
static const IconData follow = IconData(0xf10f, fontFamily: "Zulip Icons");
static const IconData follow = IconData(0xf111, fontFamily: "Zulip Icons");

/// The Zulip custom icon "format_quote".
static const IconData format_quote = IconData(0xf110, fontFamily: "Zulip Icons");
static const IconData format_quote = IconData(0xf112, fontFamily: "Zulip Icons");

/// The Zulip custom icon "globe".
static const IconData globe = IconData(0xf111, fontFamily: "Zulip Icons");
static const IconData globe = IconData(0xf113, fontFamily: "Zulip Icons");

/// The Zulip custom icon "group_dm".
static const IconData group_dm = IconData(0xf112, fontFamily: "Zulip Icons");
static const IconData group_dm = IconData(0xf114, fontFamily: "Zulip Icons");

/// The Zulip custom icon "hash_italic".
static const IconData hash_italic = IconData(0xf113, fontFamily: "Zulip Icons");
static const IconData hash_italic = IconData(0xf115, fontFamily: "Zulip Icons");

/// The Zulip custom icon "hash_sign".
static const IconData hash_sign = IconData(0xf114, fontFamily: "Zulip Icons");
static const IconData hash_sign = IconData(0xf116, fontFamily: "Zulip Icons");

/// The Zulip custom icon "image".
static const IconData image = IconData(0xf115, fontFamily: "Zulip Icons");
static const IconData image = IconData(0xf117, fontFamily: "Zulip Icons");

/// The Zulip custom icon "inbox".
static const IconData inbox = IconData(0xf116, fontFamily: "Zulip Icons");
static const IconData inbox = IconData(0xf118, fontFamily: "Zulip Icons");

/// The Zulip custom icon "info".
static const IconData info = IconData(0xf117, fontFamily: "Zulip Icons");
static const IconData info = IconData(0xf119, fontFamily: "Zulip Icons");

/// The Zulip custom icon "inherit".
static const IconData inherit = IconData(0xf118, fontFamily: "Zulip Icons");
static const IconData inherit = IconData(0xf11a, fontFamily: "Zulip Icons");

/// The Zulip custom icon "language".
static const IconData language = IconData(0xf119, fontFamily: "Zulip Icons");
static const IconData language = IconData(0xf11b, fontFamily: "Zulip Icons");

/// The Zulip custom icon "lock".
static const IconData lock = IconData(0xf11a, fontFamily: "Zulip Icons");
static const IconData lock = IconData(0xf11c, fontFamily: "Zulip Icons");

/// The Zulip custom icon "menu".
static const IconData menu = IconData(0xf11b, fontFamily: "Zulip Icons");
static const IconData menu = IconData(0xf11d, fontFamily: "Zulip Icons");

/// The Zulip custom icon "message_checked".
static const IconData message_checked = IconData(0xf11c, fontFamily: "Zulip Icons");
static const IconData message_checked = IconData(0xf11e, fontFamily: "Zulip Icons");

/// The Zulip custom icon "message_feed".
static const IconData message_feed = IconData(0xf11d, fontFamily: "Zulip Icons");
static const IconData message_feed = IconData(0xf11f, fontFamily: "Zulip Icons");

/// The Zulip custom icon "mute".
static const IconData mute = IconData(0xf11e, fontFamily: "Zulip Icons");
static const IconData mute = IconData(0xf120, fontFamily: "Zulip Icons");

/// The Zulip custom icon "plus".
static const IconData plus = IconData(0xf121, fontFamily: "Zulip Icons");

/// The Zulip custom icon "read_receipts".
static const IconData read_receipts = IconData(0xf11f, fontFamily: "Zulip Icons");
static const IconData read_receipts = IconData(0xf122, fontFamily: "Zulip Icons");

/// The Zulip custom icon "send".
static const IconData send = IconData(0xf120, fontFamily: "Zulip Icons");
static const IconData send = IconData(0xf123, fontFamily: "Zulip Icons");

/// The Zulip custom icon "settings".
static const IconData settings = IconData(0xf121, fontFamily: "Zulip Icons");
static const IconData settings = IconData(0xf124, fontFamily: "Zulip Icons");

/// The Zulip custom icon "share".
static const IconData share = IconData(0xf122, fontFamily: "Zulip Icons");
static const IconData share = IconData(0xf125, fontFamily: "Zulip Icons");

/// The Zulip custom icon "share_ios".
static const IconData share_ios = IconData(0xf123, fontFamily: "Zulip Icons");
static const IconData share_ios = IconData(0xf126, fontFamily: "Zulip Icons");

/// The Zulip custom icon "smile".
static const IconData smile = IconData(0xf124, fontFamily: "Zulip Icons");
static const IconData smile = IconData(0xf127, fontFamily: "Zulip Icons");

/// The Zulip custom icon "star".
static const IconData star = IconData(0xf125, fontFamily: "Zulip Icons");
static const IconData star = IconData(0xf128, fontFamily: "Zulip Icons");

/// The Zulip custom icon "star_filled".
static const IconData star_filled = IconData(0xf126, fontFamily: "Zulip Icons");
static const IconData star_filled = IconData(0xf129, fontFamily: "Zulip Icons");

/// The Zulip custom icon "three_person".
static const IconData three_person = IconData(0xf127, fontFamily: "Zulip Icons");
static const IconData three_person = IconData(0xf12a, fontFamily: "Zulip Icons");

/// The Zulip custom icon "topic".
static const IconData topic = IconData(0xf128, fontFamily: "Zulip Icons");
static const IconData topic = IconData(0xf12b, fontFamily: "Zulip Icons");

/// The Zulip custom icon "topics".
static const IconData topics = IconData(0xf129, fontFamily: "Zulip Icons");
static const IconData topics = IconData(0xf12c, fontFamily: "Zulip Icons");

/// The Zulip custom icon "unmute".
static const IconData unmute = IconData(0xf12a, fontFamily: "Zulip Icons");
static const IconData unmute = IconData(0xf12d, fontFamily: "Zulip Icons");

/// The Zulip custom icon "user".
static const IconData user = IconData(0xf12b, fontFamily: "Zulip Icons");
static const IconData user = IconData(0xf12e, fontFamily: "Zulip Icons");

// END GENERATED ICON DATA
}
Expand Down
Loading