One small issue. Currently, if a header link is internal to a site (e.g. to a particular category), if it is tapped in the responsive menu, the responsive menu will stay open. The expected behaviour is that the menu would close.
Recently the icons disappeared. It might have been with the last upgrade of the Brand header theme, but Iām not sure. If you go to https://la.confederac.io, and hover over the icons area, you will see that the placeholders with links are there, but the icons are not visible.
We have two icons coming from a png using custom css, and a third consisting of a plain fa-rss icon.
first things first: Thanks for conceiving and maintaining this excellent theme component, @vinothkannans! We started to lean on it recently and have been glad there was finally a flexible header component which we still missed about two years ago when configuring our first Discourse instance.
Introduction
@LittleLebowsky discovered some bugs on the account activation page on a site which uses the brand header theme component, so we started digging for the reason behind that and would like to share the outcome with you again.
We came up with an appropriate workaround which at least will assure the rendering will not break completely. It does so by effectively not displaying the brand header at all when not getting runtime-initialized. You can find the corresponding PR at https://github.com/discourse/discourse-brand-header/pull/2.
Thanks for sharing this! However, as someone inexperienced myself, I wasnāt able to get the code snippet to work for all my links on my brand header. I basically copied and pasted the code multiple times for each link so it would open in a new tab. Since I know this is not the most efficient way of doing this, how can I set it so that all of the links on the header open in a new tab? Thanks!
If you want every link in the Brand Header to open in a new tab, you can use the following code, however, itās important to note that itās usually considered better practice to allow users to chose whether they want to open a new tab or not.
Thanks for your help! Iāve decided to only use it for the social icons, but keep the rest of the links working. However, in my implementation, I noticed if the hamburger menu is used such as on mobile, it will now open just a blank page. How would I specifically change it so that if the hamburger is visible to not use that functionality or if on a mobile device to not open a new tab?
It sounds like you have the script in the Common section of your theme component. If you place it in the Desktop section, it should only apply to the desktop view, and not the mobile view that includes the hamburger menu.
I am also seeing this issue for internal links, where the header does not disappear on mobile. Instead, the header slides right and leaves the main page opaque (I believe an overlay is being set), even if the header is folded back up.