Summary | F NAV - Mobile Navigation Tabs | |
Preview | Theme Creator | |
Repository | GitHub - VaperinaDEV/f-nav-for-mobile: F NAV - Mobile Navigation Tabs | |
Install Guide | How to install a theme or theme component | |
New to Discourse Themes? | Beginner’s guide to using Discourse Themes |
Install this theme component
Hello
Before, I have created a Dev topic for it as a theme component concept and now this is in a state to be a Theme component.
Please be sure to test it before use in live.
Some info here about the component: F NAV - Theme component concept
About the theme component. I was read so much posts about it would be wonderful to make the Discourse Tab Bar for Mobile more dynamic and add the ability to handle e.g. notifications etc… F-NAV can do this and more…
Header
It hides the hamburger, user menu, search and chat and adds a profile (avatar) menu button which contains the default user menu profile tab content.
Settings
It also contains a setting where you can add custom items before Log Out item.
It contains three fields where you can easily add custom items.
There are some settings for show/hide the default header icons which is useful when you don’t want to place the exact tab in F NAV so it will shown on header.
Tabs
It is possible to associate different functions with tabs. These functions allow each tab to change dynamically.
Such changes include:
Functions
home
- switches the home tab icon on topic routes to left arrow which add a go back function
- adds new or unread topic indicator dot
hamburger (opens the hamburger menu)
multi
multi tab
Multi tab is change automatically to message tab if chat is not enabled or user turn it off in
user settings.
The notifications bubble changes as it is urgent or not.
Multi tab urgent notifications are green and looks like this.
Expanded
Personal message is always green but chat can be blue as originally for example unread channel message notification.
Expanded
Single notification
message
- adds message button with notifications and clicking of it opens a messages modal for quick look
chat
- adds chat button with it’s functions
notificationToRoute
-
if do not disturb active the bell icon will change to bell-slash icon and the dnd until time is appears
-
redirects to profile notifications page bypass the notification menu
- if there is notification it redirects to
/notifications?filter=unread
- if there is no notification it redirects to
/notifications
- if there is a reviewable content red flag will appear and redirects to
/review
- if there is notification it redirects to
notificationMenu
-
if do not disturb active the bell icon will change to bell-slash icon and the dnd until time is appears
-
opens notification menu
search
- redirects to context base
/search
page
Settings
I try to make the settings simple as possible.
It will contains four fields.
- name: This is just for easier identify the tab in setting.
- icon: Adds icon to the tab. Note: If you select a function there might be icons which not overridable with this setting.
- destination: Adds destination for your custom tab. Note: If you select a function that will handle the destination so you can leave it empty. The component handle the
/my/...
destinations automatically convert to/u/username/...
so the tabs active status can be added correctly. - function: Choose a function to the tab.
Admins can simply create/remove/change tabs and select from one of the functions or add a custom destination to the tab.
Functions
E.g. adding topic creation tab will simply looks like this.
Credit: Discourse Tab Bar for Mobile and thanks for everyone the feedbacks in F NAV - Theme component concept topic.