It would be nice to add the checkbox option (in /admin/config/user-interface/admin-toolbar-tools) to hide\show toolbar-item-administration-tray on by default (on page load)
and in admin_toolbar.js

if(settings.toolbar.collapsed) {
  $('body').removeClass('toolbar-tray-open');
  $('#toolbar-item-administration').removeClass('is-active');
  $('#toolbar-item-administration-tray').removeClass('is-active');	
}

Comments

Promo-IL created an issue. See original summary.

promo-il’s picture

Issue summary: View changes
promo-il’s picture

Assigned: Unassigned » promo-il
dydave’s picture

Version: 3.4.1 » 3.x-dev
Related issues: +#3304810: Toggle away Admin Toolbar completely
dydave’s picture

Assigned: promo-il » Unassigned
Status: Active » Closed (won't fix)

The behavior described in the issue summary is actually controlled by the core Toolbar module.

Altering the current behavior could have other/unexpected consequences (ie. break things 😅).

Besides, it would appear the behavior requested is already provided by the Toolbar module:

  1. Click on the manage Toolbar item to close/collapse the Tray toolbar-item-administration-tray.
  2. Navigate to a different page by clicking a link on the page.
  3. When the next page loads, the tray is collapsed by default.

 
The default tray selected on a page load, is stored in user's browser local storage (Drupal.toolbar.activeTabID), changed with user's selection (clicking on toolbar items).
 
Additionally, since this feature request didn't receive any further comments for almost two years, it seems it didn't manage attracting much interest from other users of the module.
 
Therefore, closing issue as Won't fix, for now.
 
Thanks in advance!