Try the experimental mobile footer navigation!

סיכום מבוסס בינה מלאכותית

awesomerobot announced an experimental mobile footer navigation layout for Discourse, designed to improve thumb reach on mobile devices. Enabled via /admin/upcoming-changes under “Mobile footer navigation,” this feature replaces the traditional header menu with a persistent bottom navigation bar. The footer includes shortcuts to Site sections (Topics, Chat, AI conversations, Admin), a global Menu button, and a Create button for new content. A secondary row above the footer displays context-specific views like “Latest” or “Unread,” which hides on scroll-down and reappears on scroll-up. The footer also hides when the keyboard is active. Switching between sections retains the user’s previous location within that section.

For developers, the post details API options to add custom sections, routes, secondary navigation via MobileTabBarViews, and creation actions. Unread indicators can be added using a badgeComponent.

Community feedback was largely positive. putty asked if unused features like Chat or AI agents hide their respective buttons. awesomerobot confirmed they do, though a setting to manually exclude enabled sections is under consideration.

darkpixlz liked the design but questioned why the footer is static rather than hiding on scroll like many modern apps, and suggested placing the user profile in the footer similar to Instagram. awesomerobot explained that unlike Instagram, Discourse’s dynamic feature set (e.g., Admin, Chat) varies per user, which would cause the profile icon to shift positions. To ensure the user menu remains in a consistent location, it currently stays in the header. darkpixlz agreed that consistent icon placement is crucial to avoid frustration and suggested that if customization is added later, it should be a user preference rather than a global admin setting.

We’re introducing an experimental mobile navigation layout that puts the main areas of your community within easier reach of your thumbs. This is behind an experimental upcoming change called “Mobile footer navigation.” Admins with a recently updated Discourse site can enable it from /admin/upcoming-changes.

Instead of opening the menu from the header, you’ll find a navigation bar at the bottom of the screen, with shortcuts to site sections, a global menu button, and a button for creating new content.

If you’d like to try it out here on Meta, join the design experiments group! This will be broadened to all Meta users if it goes well.

What does it change?

The new footer brings together:

  • Site sections: Switch between Topics, Chat, AI conversations, Admin and more! Other sections can be added via the API, and we’ll likely add support for more of our own plugins if this experiment progresses.
  • Menu: Open the site’s global hamburger menu… this is no longer contextual and will be persistent no matter where you are.
  • Create: Start a topic, personal message, chat, or AI conversation, according to your permissions and enabled features. Drafts are available here too.
  • Subnavs: On topic lists, views such as Latest, New, Unread, and Top appear in a secondary row above the main navigation.

The secondary row slides away as you scroll down and returns when you scroll up. The footer also hides while your keyboard is open for composing or chatting.

Switching between sections remembers where you left off. For example, you can move from a topic to Chat and then return to that topic. Tapping the active nav item again takes you back toward its start: from a topic to the topic list, from a chat channel to the channel list, etc.

When there are more than four navigation tabs, the first three stay visible and the remaining sections appear in an ellipsis button menu.

Anonymous visitors to public sites can use the footer too, with the login button available.

Navigation for larger screens remains unchanged, but we’re interested in exploring a consistent way to switch contexts there too.

For plugin and theme developers

This is an experimental change, so keep in mind these methods may change, but if you’d like to experiment with it the footer builds on the existing sidebar panel API. A panel opts in by returning a mobileTab object from its mobileTab getter.

Add a section tab

Use api.addSidebarPanel() to register a panel, or add a mobileTab getter to an existing panel:

import { routeWithin } from "discourse/lib/mobile-tab-bar";
import { withPluginApi } from "discourse/lib/plugin-api";
import { i18n } from "discourse-i18n";

export default {
  name: "example-mobile-navigation",

  initialize(container) {
    const router = container.lookup("service:router");

    withPluginApi((api) => {
      api.addSidebarPanel(
        (BaseCustomSidebarPanel) =>
          class extends BaseCustomSidebarPanel {
            key = "example";
            switchButtonIcon = "compass";

            get switchButtonLabel() {
              return i18n("example.navigation.title");
            }

            get switchButtonDefaultUrl() {
              return "/example";
            }

            get mobileTab() {
              return {
                label: this.switchButtonLabel,
                icon: this.switchButtonIcon,
                url: "/example",
                ownsRoute: (routeInfo) =>
                  routeWithin(routeInfo, "example"),
                isNestedRoute: (routeInfo) =>
                  routeWithin(routeInfo, "example.item"),
                createActions: [
                  {
                    label: i18n("example.navigation.new_item"),
                    icon: "plus",
                    action: () =>
                      router.transitionTo("example.new"),
                  },
                ],
              };
            }
          }
      );
    });
  },
};

The mobileTab object supports these properties:

Property Purpose
label Translated text displayed on the tab.
icon Icon displayed on the tab.
url The section’s starting URL, used before a previous location has been remembered.
primary Optional. Places the tab after Topics and ahead of other tabs.
badgeComponent Optional. Component rendered over the icon for unread indicators or counts.
ownsRoute(routeInfo) Identifies routes belonging to the section and determines when its tab is active.
isNestedRoute(routeInfo) Identifies detail pages where tapping the active tab or using the header’s back button should return to the section’s list.
showsTitleInHeader(routeInfo) Controls whether a nested page uses the title-style header beside the back button. Defaults to true.
createActions Optional array of { label, icon, action } objects contributed to the global Create button.

Topics appear first, followed by primary navigation tabs, other tabs, and admin.

Match routes and nested pages

Two helpers are available from discourse/lib/mobile-tab-bar:

  • routeWithin(routeInfo, ...names) matches a named route and its descendants.
  • findRoute(routeInfo, name) finds a named route in the current route’s ancestry, allowing access to its model through .attributes.

Other sections are checked before Topics when determining route ownership. This lets an extension claim a topic that represents content in its own section, as AI conversations do.

If no section claims a route, no section tab is highlighted, and the previously remembered section locations are retained.

Add secondary navigation

Use MobileTabBarViews to render a section’s views or controls in the row above the footer:

import Component from "@glimmer/component";
import { service } from "@ember/service";
import MobileTabBarViews from "discourse/components/mobile-tab-bar/views";
import ExampleNavigation from "./example-navigation";

export default class ExamplePage extends Component {
  @service mobileTabBar;

  <template>
    {{#if this.mobileTabBar.enabled}}
      <MobileTabBarViews>
        <ExampleNavigation />
      </MobileTabBarViews>
    {{else}}
      <ExampleNavigation />
    {{/if}}
  </template>
}

MobileTabBarViews renders its block into the footer’s secondary row. It renders nothing while the footer is hidden or disabled, so keep your usual navigation as the fallback.

The footer’s Menu button always opens the forum menu. Each section should provide its own navigation on its pages or through this secondary row.

Add creation actions and badges

Creation actions from all participating tabs are collected into the global Create button, with the current section’s actions first. Drafts are appended when available. If there is only one action, the button runs it directly… otherwise, it opens a menu.

For unread indicators, supply a badgeComponent that renders its own state and renders nothing when there is nothing to show.

:rocket: Let us know what you think!

Please let us know how the new navigation feels, especially when moving between topics, Chat, and other sections. If you encounter a layout or navigation issue, please let us know which device/browser combo you’re using!

6 לייקים

Looks great! I can see this being very helpful for those with larger devices :+1:

Is it safe to assume that if someone doesn’t have chat or AI agents enabled, those buttons don’t show up?

לייק 1

Yep! It might be useful to have a setting to exclude some sections even when enabled, but starting simple for now.

לייק 1

This is cool! I like it more than I expected to. My only thoughts is that it’s static and doesn’t move at all…

Wouldn’t it make a little bit of sense to respond to scrolls and lower it like this?

Would it also not make sense to have your profile down there like how Instagram works?

3 לייקים

Maybe! Instagram has it easy because they have a fixed number of options for everyone, in the case of Discourse we’re definitely going to be adding more features that could make sense in a footer bar, so a “…” button with a drawer to more sections may be necessary (and would always be the rightmost icon).

So the last item in the bar might not always be consistent, and ideally your notifications/user menu would always be in the same place. For now the header makes that easy.

לייק 1

Understood and 100% agreed—it would annoy me if the profile icon was darting around from site-to-site based on if I had admin or some features enabled. If this is ever customizable I think it would be great if that was a user option and admins only set default because that seems like one of those things that admins have no right controlling for every user when it is something so personal. Besides that nice work :slight_smile:

לייק 1