Problem/Motivation
Toolbar items - at the top level - without tray never become active. This is misleading for the user.
To replicate: implement hook_toolbar and create a toolbar item without a tray. Click the toolbar item.
Proposed resolution
Make sure the correct item is active.
Remaining tasks
-
User interface changes
The correct toolbar item is active.
API changes
-
Data model changes
-
Comment | File | Size | Author |
---|---|---|---|
#2 | 2748561-toolbar_item_no_tray_not_active-2.patch | 1.27 KB | Bart Vanhoutte |
Comments
Comment #2
Bart Vanhoutte CreditAttribution: Bart Vanhoutte at Duo commentedFound this behaviour in 8.1.2, might be present in 8.2.x-dev as well. I haven't had the time to check yet so we might want to fix this in 8.2.x-dev and backport it to 8.1.x-dev.
To get this working I've applied the patch attached and added an HTML ID to the toolbar item. I suggest we use this patch and document the fact that toolbar items without a tray need an HTML ID in order to get the active state.
Comment #3
Bart Vanhoutte CreditAttribution: Bart Vanhoutte at Duo commentedComment #4
Bart Vanhoutte CreditAttribution: Bart Vanhoutte at Duo commentedComment #5
Bart Vanhoutte CreditAttribution: Bart Vanhoutte at Duo commentedComment #7
Ashley George CreditAttribution: Ashley George at Investis Digital commentedI don't think this patch works. Certainly not in the following way. Here's how I tested:
I appreciate there are a lot of ways to configure a toolbar item so maybe I didn't do the right thing. But certainly in the situation I describe, the shortcut toolbar item should be highlighted to show that the user is on the shortcuts page!
Comment #8
Ashley George CreditAttribution: Ashley George at Investis Digital commented@Bart Vanhoutte do you think this is fair enough. Have I tested in the right way? If not could you provide some extra details on your steps to recreate.
Otherwise, I guess it's going back to 'Needs Work'.
Comment #10
wturrell CreditAttribution: wturrell as a volunteer commented[EDITED] (sorry, I misunderstood at first)
Can you clarify the issue a bit more? e.g. give some example code and steps to reproduce original problem.
i.e. if a toolbar hasn't got an associated tray, what would be the value to the user of highlighting it with
.is-active
? Isn't it only beneficial if there are further options for them to select?Comment #16
pameeela CreditAttribution: pameeela commentedThanks for reporting this issue. We rely on issue reports like this one to resolve bugs and improve Drupal core.
As part of the Bug Smash Initiative, we are triaging issues that are marked "Postponed (maintainer needs more info)".
Since there were no specific steps to reproduce the issue provided since the issue was postponed, I'm marking the issue "Closed (cannot reproduce)". If anyone can provide complete steps to reproduce the issue (starting from "Install Drupal core"), document those steps in the issue summary and set the issue status back to "Active".
Thanks!