Skip to content
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

Bottom tabs and main menu #1035

Open
gnprice opened this issue Nov 1, 2024 · 5 comments
Open

Bottom tabs and main menu #1035

gnprice opened this issue Nov 1, 2024 · 5 comments
Assignees
Labels
a-design Visual and UX design a-home The home screens of the app; finding and starting conversations

Comments

@gnprice
Copy link
Member

gnprice commented Nov 1, 2024

This is our new design for the overall navigation of the app. It replaces the current placeholder home page. In this design:

  1. There is a bottom tab bar (aka "navigation bar", in Material 3 terms). It has 6 buttons: Inbox, Combined feed, Mentions, Direct messages, Channels, Menu.

    • All of those buttons except Menu go to screens we already have implemented. Menu is described below.
    • The navigation bar appears only on the screens that it leads directly to. In particular it does not appear on message lists.
    • Changes vs. RN legacy app: Search and Starred move from the top bar into the menu. There's no top bar.
    • For detailed design of the navigation bar, see Figma: here, and further details here. Screenshot:
      image
  2. The screen with the bottom tab bar is the root of the navigation stack; there's no navigating "back" or "up" from there. For how the user reaches the choose-account page (which we currently put at the root of the navigation stack), see below.

  3. The menu is a modal bottom sheet. It has the same options as the navigation bar (except Menu itself), plus "Starred messages".

Background

This design balances two things we want:

  1. It's low-risk in terms of UX, staying fairly close to what the legacy app has. We don't want to get slowed down by having to iterate a bunch.
  2. Where possible consistent with point 1, it borrows straight from more-ambitious designs we've discussed. This means it won't require scrapping a bunch of work later on as we add more features, or if we implement something more fully like those more-ambitious designs.

Discussion in chat thread.

Previous issue, which this one supersedes:

@gnprice gnprice added a-home The home screens of the app; finding and starting conversations a-design Visual and UX design labels Nov 1, 2024
@gnprice gnprice added this to the Beta 4: Fall 2024 milestone Nov 1, 2024
@gnprice
Copy link
Member Author

gnprice commented Nov 1, 2024

This is a complex issue, so we'll want someone on the Zulip core team to handle it.

@gnprice
Copy link
Member Author

gnprice commented Nov 1, 2024

A previous draft PR implemented the navigation bar (roughly point 1 from the description above):

So that may be a helpful starting point.

@PIG208
Copy link
Member

PIG208 commented Nov 15, 2024

Just to clarify, because we have a button for the @-mentions page, I believe that the bottom tabs should be at least available for a MessageListPage of MentionsNarrow, where a compose box is not available.

Also questions:

  • In landscape mode, what would the bottom tabs look like? Do we start centering them at a certain width, or do we stretch them to fit the width of the screen?
  • This is a follow-up to 2 from the issue description. Do we want to switch between pages without navigation change? In this case, we might want to refactor InboxPage, SubscriptioinListPage, etc. so that they share the same scaffold, and the body functions like a multiplexer depending on the selected page.

@gnprice
Copy link
Member Author

gnprice commented Nov 20, 2024

Just to clarify, because we have a button for the @-mentions page, I believe that the bottom tabs should be at least available for a MessageListPage of MentionsNarrow, where a compose box is not available.

Hmm, yeah, that part will be a bit awkward — either having that one anomalous message list with bottom tabs, or having that one anomalous tab that leads to a page without the bottom tabs.

I think both kinds of anomaly are things I've seen repeatedly in other published apps. Let's start with whichever one seems easier to implement.

(And then potentially this makes a reason to relegate @-mentions to the menu, instead of also being in the bottom tab bar.)

@gnprice
Copy link
Member Author

gnprice commented Nov 20, 2024

  • In landscape mode, what would the bottom tabs look like? Do we start centering them at a certain width, or do we stretch them to fit the width of the screen?

Answered in chat the other day (after the comment above): https://chat.zulip.org/#narrow/channel/243-mobile-team/topic/UI.20redesign.3A.20root.20level.20nav/near/1982007

  • This is a follow-up to 2 from the issue description. Do we want to switch between pages without navigation change? In this case, we might want to refactor InboxPage, SubscriptioinListPage, etc. so that they share the same scaffold, and the body functions like a multiplexer depending on the selected page.

I'm not sure offhand what the right way is to organize the code, or to handle the navigation APIs to manage this.

Looking at the NavigationBar doc, that API seems to clearly want something much like you said: one page, a stateful widget, which provides the Scaffold and its NavigationBar.

Given that, I think the approach I'd try first (because it's my best guess for the right way) is:

  • Those page widgets get refactored to be page bodies instead. This should be a small change: basically just return the thing that would have been passed to Scaffold.body, instead of returning the Scaffold itself.
    • Probably can have an NFC prep commit that splits page from body: e.g. make an InboxBody that's what the later steps will need, and a new InboxPage that wraps that. A later step will drop InboxPage.
  • This is probably a reason to favor having @-mentions as its own page (so it's an anomalous tab, instead of an anomalous message list). That'd be a messier refactor for that one, because it's just a particular case of MessageListPage.

Probably a chat thread would be a good place for further discussion. I'll more reliably see it sooner and reply, and it's a more interactive medium.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-design Visual and UX design a-home The home screens of the app; finding and starting conversations
Projects
Status: No status
Development

No branches or pull requests

2 participants