Skip to content

Commit a97ac42

Browse files
committed
nav: Add bottom tabs and main menu
This is an initial implementation because some features were considered out-of-scope as of now for #1035. Compared to the Figma, we swapped the order of _ChannelsButton and _DirectMessagesButton in the menu so they match their order on the navigation bar. See: https://chat.zulip.org/#narrow/channel/48-mobile/topic/Buttons.20on.20the.20bottom.20tabs.20and.20main.20menu We also added _CombinedFeedButton, using the same icon we have for "Combined feed" on the web app's topleft sidebar, added a "Switch account" button, and renamed "Streams" to "Channels". For now, we do not aim to fully implement the app bar redesign; we keep a simple one in this implementation. We maintain a 16px padding for the title text on the app bar for both ChooseAccountPage (when it is at the root navigation level) and HomePage (which is expected to be at the root level all the time). We allow user to navigate to the choose-account page from the loading screen after a certain timeout. This is helpful when loading the account data takes a while, and that the user, for example, wants to try another account. See: #1076 (comment) Signed-off-by: Zixuan James Li <[email protected]>
1 parent bd3b5b0 commit a97ac42

17 files changed

+1293
-92
lines changed

assets/l10n/app_en.arb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
"@chooseAccountPageTitle": {
2020
"description": "Title for the page to choose between Zulip accounts."
2121
},
22+
"switchAccountButton": "Switch account",
23+
"@switchAccountButton": {
24+
"description": "Label for main-menu button leading to the choose-account page."
25+
},
26+
"tryAnotherAccountMessage": "Your account at {url} is taking a while to load.",
27+
"@tryAnotherAccountMessage": {
28+
"description": "Message that appears on the loading screen after waiting for some time.",
29+
"url": {"type": "String", "example": "http://chat.example.com/"}
30+
},
31+
"tryAnotherAccountButton": "Try another account",
32+
"@tryAnotherAccountButton": {
33+
"description": "Label for loading screen button prompting user to try another account."
34+
},
2235
"chooseAccountPageLogOutButton": "Log out",
2336
"@chooseAccountPageLogOutButton": {
2437
"description": "Label for the 'Log out' button for an account on the choose-account page"
@@ -561,6 +574,10 @@
561574
"@userRoleUnknown": {
562575
"description": "Label for UserRole.unknown"
563576
},
577+
"inboxPageTitle": "Inbox",
578+
"@inboxPageTitle": {
579+
"description": "Title for the page with unreads."
580+
},
564581
"recentDmConversationsPageTitle": "Direct messages",
565582
"@recentDmConversationsPageTitle": {
566583
"description": "Title for the page with a list of DM conversations."
@@ -577,6 +594,14 @@
577594
"@starredMessagesPageTitle": {
578595
"description": "Page title for the 'Starred messages' message view."
579596
},
597+
"channelsPageTitle": "Channels",
598+
"@channelsPageTitle": {
599+
"description": "Title for the page with a list of subscribed channels."
600+
},
601+
"mainMenuMyProfile": "My profile",
602+
"@mainMenuMyProfile": {
603+
"description": "Label for main-menu button leading to the user's own profile."
604+
},
580605
"channelFeedButtonTooltip": "Channel feed",
581606
"@channelFeedButtonTooltip": {
582607
"description": "Tooltip for button to navigate to a given channel's feed"

lib/generated/l10n/zulip_localizations.dart

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,24 @@ abstract class ZulipLocalizations {
133133
/// **'Choose account'**
134134
String get chooseAccountPageTitle;
135135

136+
/// Label for main-menu button leading to the choose-account page.
137+
///
138+
/// In en, this message translates to:
139+
/// **'Switch account'**
140+
String get switchAccountButton;
141+
142+
/// Message that appears on the loading screen after waiting for some time.
143+
///
144+
/// In en, this message translates to:
145+
/// **'Your account at {url} is taking a while to load.'**
146+
String tryAnotherAccountMessage(Object url);
147+
148+
/// Label for loading screen button prompting user to try another account.
149+
///
150+
/// In en, this message translates to:
151+
/// **'Try another account'**
152+
String get tryAnotherAccountButton;
153+
136154
/// Label for the 'Log out' button for an account on the choose-account page
137155
///
138156
/// In en, this message translates to:
@@ -853,6 +871,12 @@ abstract class ZulipLocalizations {
853871
/// **'Unknown'**
854872
String get userRoleUnknown;
855873

874+
/// Title for the page with unreads.
875+
///
876+
/// In en, this message translates to:
877+
/// **'Inbox'**
878+
String get inboxPageTitle;
879+
856880
/// Title for the page with a list of DM conversations.
857881
///
858882
/// In en, this message translates to:
@@ -877,6 +901,18 @@ abstract class ZulipLocalizations {
877901
/// **'Starred messages'**
878902
String get starredMessagesPageTitle;
879903

904+
/// Title for the page with a list of subscribed channels.
905+
///
906+
/// In en, this message translates to:
907+
/// **'Channels'**
908+
String get channelsPageTitle;
909+
910+
/// Label for main-menu button leading to the user's own profile.
911+
///
912+
/// In en, this message translates to:
913+
/// **'My profile'**
914+
String get mainMenuMyProfile;
915+
880916
/// Tooltip for button to navigate to a given channel's feed
881917
///
882918
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Choose account';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Log out';
2839

@@ -443,6 +454,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
443454
@override
444455
String get userRoleUnknown => 'Unknown';
445456

457+
@override
458+
String get inboxPageTitle => 'Inbox';
459+
446460
@override
447461
String get recentDmConversationsPageTitle => 'Direct messages';
448462

@@ -455,6 +469,12 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
455469
@override
456470
String get starredMessagesPageTitle => 'Starred messages';
457471

472+
@override
473+
String get channelsPageTitle => 'Channels';
474+
475+
@override
476+
String get mainMenuMyProfile => 'My profile';
477+
458478
@override
459479
String get channelFeedButtonTooltip => 'Channel feed';
460480

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Choose account';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Log out';
2839

@@ -443,6 +454,9 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
443454
@override
444455
String get userRoleUnknown => 'Unknown';
445456

457+
@override
458+
String get inboxPageTitle => 'Inbox';
459+
446460
@override
447461
String get recentDmConversationsPageTitle => 'Direct messages';
448462

@@ -455,6 +469,12 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
455469
@override
456470
String get starredMessagesPageTitle => 'Starred messages';
457471

472+
@override
473+
String get channelsPageTitle => 'Channels';
474+
475+
@override
476+
String get mainMenuMyProfile => 'My profile';
477+
458478
@override
459479
String get channelFeedButtonTooltip => 'Channel feed';
460480

lib/generated/l10n/zulip_localizations_fr.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Choose account';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Log out';
2839

@@ -443,6 +454,9 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
443454
@override
444455
String get userRoleUnknown => 'Unknown';
445456

457+
@override
458+
String get inboxPageTitle => 'Inbox';
459+
446460
@override
447461
String get recentDmConversationsPageTitle => 'Direct messages';
448462

@@ -455,6 +469,12 @@ class ZulipLocalizationsFr extends ZulipLocalizations {
455469
@override
456470
String get starredMessagesPageTitle => 'Starred messages';
457471

472+
@override
473+
String get channelsPageTitle => 'Channels';
474+
475+
@override
476+
String get mainMenuMyProfile => 'My profile';
477+
458478
@override
459479
String get channelFeedButtonTooltip => 'Channel feed';
460480

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'アカウントを選択';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Log out';
2839

@@ -443,6 +454,9 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
443454
@override
444455
String get userRoleUnknown => '不明';
445456

457+
@override
458+
String get inboxPageTitle => 'Inbox';
459+
446460
@override
447461
String get recentDmConversationsPageTitle => 'Direct messages';
448462

@@ -455,6 +469,12 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
455469
@override
456470
String get starredMessagesPageTitle => 'Starred messages';
457471

472+
@override
473+
String get channelsPageTitle => 'Channels';
474+
475+
@override
476+
String get mainMenuMyProfile => 'My profile';
477+
458478
@override
459479
String get channelFeedButtonTooltip => 'Channel feed';
460480

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Wybierz konto';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Wyloguj';
2839

@@ -443,6 +454,9 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
443454
@override
444455
String get userRoleUnknown => 'Nieznany';
445456

457+
@override
458+
String get inboxPageTitle => 'Inbox';
459+
446460
@override
447461
String get recentDmConversationsPageTitle => 'Wiadomości bezpośrednie';
448462

@@ -455,6 +469,12 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
455469
@override
456470
String get starredMessagesPageTitle => 'Wiadomości z gwiazdką';
457471

472+
@override
473+
String get channelsPageTitle => 'Channels';
474+
475+
@override
476+
String get mainMenuMyProfile => 'My profile';
477+
458478
@override
459479
String get channelFeedButtonTooltip => 'Strumień kanału';
460480

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
2323
@override
2424
String get chooseAccountPageTitle => 'Выберите учетную запись';
2525

26+
@override
27+
String get switchAccountButton => 'Switch account';
28+
29+
@override
30+
String tryAnotherAccountMessage(Object url) {
31+
return 'Your account at $url is taking a while to load.';
32+
}
33+
34+
@override
35+
String get tryAnotherAccountButton => 'Try another account';
36+
2637
@override
2738
String get chooseAccountPageLogOutButton => 'Выход из системы';
2839

@@ -443,6 +454,9 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
443454
@override
444455
String get userRoleUnknown => 'Unknown';
445456

457+
@override
458+
String get inboxPageTitle => 'Inbox';
459+
446460
@override
447461
String get recentDmConversationsPageTitle => 'Direct messages';
448462

@@ -455,6 +469,12 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
455469
@override
456470
String get starredMessagesPageTitle => 'Отмеченные сообщения';
457471

472+
@override
473+
String get channelsPageTitle => 'Channels';
474+
475+
@override
476+
String get mainMenuMyProfile => 'My profile';
477+
458478
@override
459479
String get channelFeedButtonTooltip => 'Channel feed';
460480

0 commit comments

Comments
 (0)