Discourse Tab Bar for Mobile

The new update did fix the drop-down in bookmarks page. But now the /new-topic shortcut is not working (means the editor is not opening). And that’s the most important thing on my website. It makes it way easy for people to start a new topic from anywhere.
Please fix this.

Update: I checked it a little more and it happens only when we are on homepage and trigger /new-topic. But, if we are on any other page then and we click trigger /new-topic then the editor does open.

Are you sure this was working before? I tried reverting the update locally and this still doesn’t work. I’m thinking this might be caused by a recent change to discourse’s core.

2 Likes

Yes I am sure that it was working before. But I didn’t checked it for last 3 days so maybe it happened after current Discourse version beta 5. I checked it after updating Tab bar component and that’s why I reported it here.

1 Like

Its possible not to show the tab on topics pages? @Osama

Yes, you can create a new component with this bit of CSS:

body[class*="archetype-"] .d-tab-bar-theme {
    display: none;
}

and make it active in your main theme(s) where you have the tab bar component active.

6 Likes

@Osama thanks for making this! Is there a simple way to add a ‘New Topic’ tab to the component?

Hi @P16

Yes there is a way to do that. Pick one of the 6 available tabs and change its setting to this: New Topic, plus, /new-topic. The plus is the icon name, you can change it to any of the FA5 icons.

8 Likes

Thanks, works great!

1 Like

How to show Solid Clipboard icon in one of the tabs? When I type clipboard then it shows outlined clipboard only.

The solid clipboard icon is kind of a special case: The default icon style is solid, but in discourse core we have a rule that maps clipboard to far-clipboard which is the outline version of the icon.

If you want to have the solid icon, you can grab its SVG file, give the icon a custom name and upload the file to your theme/component (make sure the SCSS var name for the upload is set to icons-sprite). Then you can refer to icon by the custom name you gave it in this component.

6 Likes