Discourse Tab Bar for Mobile

Works like a charm, thanks a lot @Osama. Just one minor issue, with custom links (and new icons) when the button is clicked, it’s not highlighting. It keeps the highlight on the previously active button. Do I need some custom CSS to include the text of the new button?

Does it not highlight the correct icon if you just use the relative path without the domain (i.e. with just /c/theme/61 as the URL)?

I tested it and it highlights when I use the relative path but not when I use the full URL. I will fix this soon.

3 Likes

A question: is it possible to have links similar to the ones on the bottom tab of the discourse mobile app? Like go back or share-url-like?

No, it’s not possible to do that. This component only works with links or route names that you will be taken to when you click on the tabs. Having one of the tabs take you back (or share URL) would require custom JS code that would need to run when you click on the tab, and there is no way to pass a piece of JS code to the component via settings because it would make the settings incredibly complicated (and technically this wouldn’t work without adding unsafe-eval to CSP which is bad).

4 Likes

@gdpelican

Is there any way to open Babble Chat from a tab bar button? Babble does not have a defined route.
It would work with this command:
this.appEvents.trigger("babble-toggle-chat")

running into a bit of an issue. when this component is on, the post number now blocks the reply button, as shown here. happens on both android and iOS.

@b481 I can’t reproduce this on theme-creator.discourse.org or my local instance. Perhaps you have other customizations interfering?

2 Likes