Skip to content

Commit

Permalink
nav: Add bottom tabs and main menu
Browse files Browse the repository at this point in the history
This is an initial implementation because some features were considered
out-of-scope as of now for zulip#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".

Signed-off-by: Zixuan James Li <[email protected]>
  • Loading branch information
PIG208 committed Dec 4, 2024
1 parent c9b66c4 commit 4b4aad6
Show file tree
Hide file tree
Showing 8 changed files with 731 additions and 71 deletions.
16 changes: 16 additions & 0 deletions assets/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"@chooseAccountPageTitle": {
"description": "Title for ChooseAccountPage"
},
"switchAccountButton": "Switch account",
"@switchAccountButton": {
"description": "Main menu button for the choose-account page"
},
"chooseAccountPageLogOutButton": "Log out",
"@chooseAccountPageLogOutButton": {
"description": "Label for the 'Log out' button for an account on the choose-account page"
Expand Down Expand Up @@ -529,6 +533,10 @@
"@userRoleUnknown": {
"description": "Label for UserRole.unknown"
},
"inboxButton": "Inbox",
"@inboxButton": {
"description": "Label for the menu button switching to inbox."
},
"recentDmConversationsPageTitle": "Direct messages",
"@recentDmConversationsPageTitle": {
"description": "Title for the page of recent DM conversations"
Expand All @@ -545,6 +553,14 @@
"@starredMessagesPageTitle": {
"description": "Title for the page of starred messages."
},
"channelsButton": "Channels",
"@channelsButton": {
"description": "Label for the menu button switching to channels."
},
"profilePageTitle": "My profile",
"@profilePageTitle": {
"description": "Title for the page of the logged in user's profile."
},
"channelFeedButtonTooltip": "Channel feed",
"@channelFeedButtonTooltip": {
"description": "Tooltip for button to navigate to a given channel's feed"
Expand Down
24 changes: 24 additions & 0 deletions lib/generated/l10n/zulip_localizations.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ abstract class ZulipLocalizations {
/// **'Choose account'**
String get chooseAccountPageTitle;

/// Main menu button for the choose-account page
///
/// In en, this message translates to:
/// **'Switch account'**
String get switchAccountButton;

/// Label for the 'Log out' button for an account on the choose-account page
///
/// In en, this message translates to:
Expand Down Expand Up @@ -799,6 +805,12 @@ abstract class ZulipLocalizations {
/// **'Unknown'**
String get userRoleUnknown;

/// Label for the menu button switching to inbox.
///
/// In en, this message translates to:
/// **'Inbox'**
String get inboxButton;

/// Title for the page of recent DM conversations
///
/// In en, this message translates to:
Expand All @@ -823,6 +835,18 @@ abstract class ZulipLocalizations {
/// **'Starred messages'**
String get starredMessagesPageTitle;

/// Label for the menu button switching to channels.
///
/// In en, this message translates to:
/// **'Channels'**
String get channelsButton;

/// Title for the page of the logged in user's profile.
///
/// In en, this message translates to:
/// **'My profile'**
String get profilePageTitle;

/// Tooltip for button to navigate to a given channel's feed
///
/// In en, this message translates to:
Expand Down
12 changes: 12 additions & 0 deletions lib/generated/l10n/zulip_localizations_ar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
@override
String get chooseAccountPageTitle => 'Choose account';

@override
String get switchAccountButton => 'Switch account';

@override
String get chooseAccountPageLogOutButton => 'Log out';

Expand Down Expand Up @@ -419,6 +422,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
@override
String get userRoleUnknown => 'Unknown';

@override
String get inboxButton => 'Inbox';

@override
String get recentDmConversationsPageTitle => 'Direct messages';

Expand All @@ -431,6 +437,12 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
@override
String get starredMessagesPageTitle => 'Starred messages';

@override
String get channelsButton => 'Channels';

@override
String get profilePageTitle => 'My profile';

@override
String get channelFeedButtonTooltip => 'Channel feed';

Expand Down
12 changes: 12 additions & 0 deletions lib/generated/l10n/zulip_localizations_en.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
@override
String get chooseAccountPageTitle => 'Choose account';

@override
String get switchAccountButton => 'Switch account';

@override
String get chooseAccountPageLogOutButton => 'Log out';

Expand Down Expand Up @@ -419,6 +422,9 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
@override
String get userRoleUnknown => 'Unknown';

@override
String get inboxButton => 'Inbox';

@override
String get recentDmConversationsPageTitle => 'Direct messages';

Expand All @@ -431,6 +437,12 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
@override
String get starredMessagesPageTitle => 'Starred messages';

@override
String get channelsButton => 'Channels';

@override
String get profilePageTitle => 'My profile';

@override
String get channelFeedButtonTooltip => 'Channel feed';

Expand Down
12 changes: 12 additions & 0 deletions lib/generated/l10n/zulip_localizations_ja.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
@override
String get chooseAccountPageTitle => 'アカウントを選択';

@override
String get switchAccountButton => 'Switch account';

@override
String get chooseAccountPageLogOutButton => 'Log out';

Expand Down Expand Up @@ -419,6 +422,9 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
@override
String get userRoleUnknown => '不明';

@override
String get inboxButton => 'Inbox';

@override
String get recentDmConversationsPageTitle => 'Direct messages';

Expand All @@ -431,6 +437,12 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
@override
String get starredMessagesPageTitle => 'Starred messages';

@override
String get channelsButton => 'Channels';

@override
String get profilePageTitle => 'My profile';

@override
String get channelFeedButtonTooltip => 'Channel feed';

Expand Down
Loading

0 comments on commit 4b4aad6

Please sign in to comment.