Problem/Motivation
Background
It is currently possible that a toolbar is empty, i.e. that there is a link in the toolbar but no actual toolbar menu items are revealed when clicking on that link. This happens most prominently when granting users the access toolbar
permission, but no access to any administrative pages. Then the "Manage" toolbar item will appear, but without any actual links.
The fact that this is currently the case is being discussed - and potentially fixed - over in {2135445}, but until that is resolved this constitutes a separate bug.
Problem description
When there is an empty toolbar tray, the orientation toggle is still displayed. It does in fact allow switching the orientation, but this is pointless as there are no menu items. Moreover, in (the default) horizontal orientation the toggle "floats" beneath the toolbar where the tray would usually be displayed - except that there is no tray, only the toggle.
Steps to reproduce
Grant a user only access to access the toolbar, nothing more.
Proposed resolution
Don't add the orientation toggle if there is no tray.
Remaining tasks
User interface changes
The toolbar toggle is no longer erroneously displayed for empty trays.
API changes
-
Data model changes
-