Skip to content

Commit

Permalink
new_dm: Add UI for starting new DM conversations
Browse files Browse the repository at this point in the history
Add a modal bottom sheet UI for starting direct messages:
- Search and select users from global list
- Support single and group DMs
- Navigate to message list after selection

Design reference: https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=4903-31879&p=f&t=pQP4QcxpccllCF7g-0
Fixes: zulip#127
  • Loading branch information
chimnayajith committed Feb 6, 2025
1 parent d22a97e commit d8818a2
Show file tree
Hide file tree
Showing 14 changed files with 640 additions and 2 deletions.
20 changes: 20 additions & 0 deletions assets/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,26 @@
"@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."
},
"newDmSheetScreenTitle": "New DM",
"@newDmSheetScreenTitle": {
"description": "Title displayed at the top of the new DM screen."
},
"newDmFabButtonLabel": "New DM",
"@newDmFabButtonLabel": {
"description": "Label for the floating action button (FAB) that opens the new DM sheet."
},
"newDmSheetSearchHint": "Add person",
"@newDmSheetSearchHint": {
"description": "Hint text for the search bar in the new DM sheet, prompting the user to add people to the conversation."
},
"composeBoxDmContentHint": "Message @{user}",
"@composeBoxDmContentHint": {
"description": "Hint text for content input when sending a message to one other person.",
Expand Down
30 changes: 30 additions & 0 deletions lib/generated/l10n/zulip_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,36 @@ 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.
///
/// 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;

/// Title displayed at the top of the new DM screen.
///
/// In en, this message translates to:
/// **'New DM'**
String get newDmSheetScreenTitle;

/// Label for the floating action button (FAB) that opens the new DM sheet.
///
/// In en, this message translates to:
/// **'New DM'**
String get newDmFabButtonLabel;

/// Hint text for the search bar in the new DM sheet, prompting the user to add people to the conversation.
///
/// In en, this message translates to:
/// **'Add person'**
String get newDmSheetSearchHint;

/// Hint text for content input when sending a message to one other person.
///
/// In en, this message translates to:
Expand Down
15 changes: 15 additions & 0 deletions lib/generated/l10n/zulip_localizations_ar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
@override
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';

@override
String get newDmSheetScreenTitle => 'New DM';

@override
String get newDmFabButtonLabel => 'New DM';

@override
String get newDmSheetSearchHint => 'Add person';

@override
String composeBoxDmContentHint(String user) {
return 'Message @$user';
Expand Down
15 changes: 15 additions & 0 deletions lib/generated/l10n/zulip_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
@override
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';

@override
String get newDmSheetScreenTitle => 'New DM';

@override
String get newDmFabButtonLabel => 'New DM';

@override
String get newDmSheetSearchHint => 'Add person';

@override
String composeBoxDmContentHint(String user) {
return 'Message @$user';
Expand Down
15 changes: 15 additions & 0 deletions lib/generated/l10n/zulip_localizations_ja.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
@override
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';

@override
String get newDmSheetScreenTitle => 'New DM';

@override
String get newDmFabButtonLabel => 'New DM';

@override
String get newDmSheetSearchHint => 'Add person';

@override
String composeBoxDmContentHint(String user) {
return 'Message @$user';
Expand Down
15 changes: 15 additions & 0 deletions lib/generated/l10n/zulip_localizations_nb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
@override
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';

@override
String get newDmSheetScreenTitle => 'New DM';

@override
String get newDmFabButtonLabel => 'New DM';

@override
String get newDmSheetSearchHint => 'Add person';

@override
String composeBoxDmContentHint(String user) {
return 'Message @$user';
Expand Down
15 changes: 15 additions & 0 deletions lib/generated/l10n/zulip_localizations_pl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
@override
String get composeBoxGenericContentHint => 'Wpisz wiadomość';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';

@override
String get newDmSheetScreenTitle => 'New DM';

@override
String get newDmFabButtonLabel => 'New DM';

@override
String get newDmSheetSearchHint => 'Add person';

@override
String composeBoxDmContentHint(String user) {
return 'Napisz do @$user';
Expand Down
15 changes: 15 additions & 0 deletions lib/generated/l10n/zulip_localizations_ru.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
@override
String get composeBoxGenericContentHint => 'Ввести сообщение';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';

@override
String get newDmSheetScreenTitle => 'New DM';

@override
String get newDmFabButtonLabel => 'New DM';

@override
String get newDmSheetSearchHint => 'Add person';

@override
String composeBoxDmContentHint(String user) {
return 'Сообщение для @$user';
Expand Down
15 changes: 15 additions & 0 deletions lib/generated/l10n/zulip_localizations_sk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,21 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
@override
String get composeBoxGenericContentHint => 'Type a message';

@override
String get newDmSheetBackButtonLabel => 'Back';

@override
String get newDmSheetNextButtonLabel => 'Next';

@override
String get newDmSheetScreenTitle => 'New DM';

@override
String get newDmFabButtonLabel => 'New DM';

@override
String get newDmSheetSearchHint => 'Add person';

@override
String composeBoxDmContentHint(String user) {
return 'Message @$user';
Expand Down
Loading

0 comments on commit d8818a2

Please sign in to comment.