Hmm… that’s an interesting point. The reason I didn’t use anchor tags is because each link is a widget that may generate a dropdown if dropdown items are present. With using the widget I am also taking advantage of the click() method that calls: DiscourseURL.routeTo(this.attrs.url);.
This has some benefits such as maintaining the history of where you are in a topic. For example if you click on a link to a topic with an anchor tag it always starts you off at the top of the topic. However, if you’ve visited the topic before and you were last reading halfway through the topic, the routeTo approach will bring you to that same position on the topic.
I wonder if there’s a way to add middle click functionality to widget clicks… will have to look into that, perhaps someone on the Discourse team might have an idea.
I am manually populating the submenu items from an external source and I send couple of ajax requests inside a loop to retrieve them. Naturally, if there are many items. The component loads before all the requests are finished and some items are missing. Is it possible to modify the source to achieve this?
Sooo… I have just implemented this theme-component and already we have gotten some pretty valid feedback from some of our long-time members.
So basically, if I were to:
(1) click on the search button on the header first, and then
(2) hover on the dropdown header second.
→ The dropdown header would pop-up underneath the search box which is not what we are looking for. Ideally, the search bar should disappear before the dropdown menu pops up.
Whereas if I were to hover on the dropdown header first, and then click on the search button, it behaves just as I expected i.e. (1) dropdown menu disappears and (2) search bar appears.
Another member also complained about how it looks on mobile, is there a way to only enable this theme-component on desktop?