FIX: Allow mobile-nav to work without loading transitions (PR #12184)

Previously, the {{mobile-nav}} component required a currentRouteName property, passed from the router service. It would observe changes in this property, and update the UI accordingly.

If we change between routes which have the same currentRouteName (e.g. two different group message inboxes), then the currentRouteName does not change and does not trigger the observer. Currently in core, we are relying on the fact that currentRouteName temporarily enters a .loading substate during a transition. This will change when we remove the loading substate in the near future.

This commit refactors {{mobile-nav}} to inject the router directly, and use the routeDidChange event instead of an observer. The change is backwards compatible, but plugins passing the old currentPath property will be shown a deprecation notice.

GitHub

is blah expected here ?

LGTM besides that minor debugging artifact :stuck_out_tongue:

Yes of course, blah is a very important route name :stuck_out_tongue:

Will fix, thanks