Navbar for webportal on mobile

Before I go and re-invent the wheel, has anyone looked into fixing the way the navbar remains in place when you go to click on a new page from the dropdowns on a mobile view (hamburger)?

I’m assuming I’ll have to go and fight with ember and pop a hook in to addClass ‘collapsed’ to the navbar when you hit a real link instead of a link with a dropdown for more options, but if anyone has already done this, shout out!

Failing that, if it’s on the roadmap for future updates, again, I’ll let it go and just wait out.


That is an intentional behavior in the Bootstrap framework which Ares uses. According to the team, that component wasn’t really designed with single-page apps in mind, so it’s expecting clicking the menu link to take you to a brand new page (and thus doesn’t need to collapse the menu.)

There are various workarounds posted on the Bootstrap GitHub Issue and StackOverflow, but none of them are great. Some have weird effects on the animation (particularly visible on non-mobile screens), some require you to use custom ember components (which is a heavy-handed solution with its own set of issues), and the pure-jquery ones are not really ideal for framework apps like Ember of Angular (you’ve basically got two things trying to mess with the DOM).

So yeah, it’s mildly annoying, but it’s part of the framework and there isn’t really a good solution.

1 Like