Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
User to be able to save toolbar toggle button based on user profile and toolbar toggle to remember last link accessed through the toolbar. Questions that need to be answered include:
- Should the toolbar be configurable in the User profile?
- Should the toolbar be configurable per user per device?
- Should the toolbar be Intelligent to remember the last visited link?
Proposed resolution
To be determined.
Remaining tasks
To be determined.
User interface changes
No interface changes.
Report by
Meta issue: #1846970: [meta] Responsive Toolbar follow-ups
Related issues
#1847114: Use localStorage event to propagate toolbar state across tabs
#1852348: Toggle to change orientation of toolbar is not easily discoverable
#1854948: Default toolbar orientation overrides user choice when changing window size
Comments
Comment #1
Shyamala CreditAttribution: Shyamala commentedtagging it as #d8ux
Comment #2
benjifisherI fixed a typo in the title. "Toogle" is amusing, but the appropriate place for humor is http://drupal.org/node/1859764.
Comment #3
tkoleary CreditAttribution: tkoleary commentedI think this could definitely be valuable. Shyamala, if you or anyone else in this issue would like to write the patch please itemize the functionality you expect and I will provide a design for the UI.
Comment #4
benjifisherOnce we have agreed on a design, I can do the PHP part of the implementation, maybe also the JS side. One challenging part of the design is deciding the exact logic for which tray, if any, is active and whether it is displayed in horizontal or vertical mode. The logic may depend on
and defaults from the site administrator and module writers.
I do not think we have consensus yest on whether the horizontal/vertical state should be for the toolbar as a whole or saved for each tray.
Comment #5
tkoleary CreditAttribution: tkoleary commentedMy gut feeling is that the orientation should come first then the tray. It would be odd to have the tray pop back and forth per tab.
Comment #6
benjifisher@tkoleary:
Can you be a little more explicit in that last bit? What would be odd?
I have implemented a silly number of tabs in my Toolbar example sandbox module: http://drupal.org/sandbox/benji/1862108. While playing around with that, my experience is that the vertical orientation works well for the admin menu, with lots of links, but it is odd for tabs that have only two or three options in the associated tray.
The terminology is evolving, but I have been using "tab" and "tray" as they are used in the code for
hook_toolbar()
(and in toolbar.api.php): the "tab" is the element (white text on black background, preferably with an icon) along the top of the screen. The "tray" is the element (dark grey on white) that is activated by a tab, and may be horizontal or vertical.I fear I may have caused some confusion by also using "tab" in the sense that browsers use it.
Comment #7
tkoleary CreditAttribution: tkoleary commentedWhat I meant was that it seems natural for the user to be able to pick their own preferred orientation for the toolbar (which would be overriden by media queries on some devices, for instance if my default was horizontal and I opened my site on a phone), but it seems odd for the user to be able to set a horizontal default orientation for one tab, say "shortcuts", and a default vertical orientation for another, say "menu" because then tabbing between the two would also toggle the orientation, which is a jarring visual change to do often in the course of working on your site.
Comment #7.0
tkoleary CreditAttribution: tkoleary commentedAdding reference to related issue Default toolbar orientation overrides user choice when changing window size
Comment #8
Bojhan CreditAttribution: Bojhan commentedI don't think we should over engineer this, lets leave this for contrib to see if its actually wanted by users.