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.
I had to reinstall Unstable-10 to check, but somehow the background for active items in the toolbar IA links has disappeared.
Compare http://skitch.com/yoroy/ncgbm/unstable-10
with http://skitch.com/yoroy/ncgbw/welcome-to-d7-d7
Comment | File | Size | Author |
---|---|---|---|
#43 | overlay-home-link.patch | 849 bytes | casey |
#42 | 663126-42-overlay-home-link.patch | 701 bytes | ksenzee |
#41 | 663126-41-overlay-home-link.patch | 701 bytes | ksenzee |
#37 | before_highlight_patch.png | 5.67 KB | aspilicious |
#37 | after_highlight_patch.png | 4.89 KB | aspilicious |
Comments
Comment #1
David_Rothstein CreditAttribution: David_Rothstein commentedLooks like this only occurs when the overlay is showing - disabling the overlay module makes it work again for me.
Comment #2
casey CreditAttribution: casey commentedOk fix:
- toolbar.js seemed to already handle this, but it should be handled in overlay (which overrides link behavior) as also other modules (e.g. admin_menu) could use overlay-displace-top.
- Added code to overlay-parent.js that matches all links in displaced regions (like toolbar) against overlay.location/window.location on respectively opening/closing of the overlay and toggles class active.
Comment #3
casey CreditAttribution: casey commentedWrong patch
Comment #4
casey CreditAttribution: casey commentedreplaced windowPath by overlayPath, which is what it is about.
Comment #5
yoroy CreditAttribution: yoroy commentedThanks, getting better already. :)
When I click another top level link while already in overlay, the active state does not follow
Comment #6
casey CreditAttribution: casey commentedDuh of course! I forgot about that.
Comment #9
casey CreditAttribution: casey commentedThis fix conflicts with patch in #668104: Make overlay respect other click handlers. That one should be reviewed/committed first.
Comment #11
casey CreditAttribution: casey commentedOk #668104: Make overlay respect other click handlers landed. This issue is almost fixed now:
It isn't working when clean URLs are disabled.
Comment #12
Bojhan CreditAttribution: Bojhan commentedDoesn't seem to be related, that should be solved in #685790: No Overlay when Clean URLs are off
Comment #13
Bojhan CreditAttribution: Bojhan commentedOops, needs review still. Can anyone else confirm its working?
Comment #14
casey CreditAttribution: casey commentedIts already working when enabled. We only need to fix this for the situation when clean URLs is disabled. There's no patch for that yet.
Comment #15
casey CreditAttribution: casey commentedThis patch makes it also work when clean URLs is disabled.
Comment #18
Bojhan CreditAttribution: Bojhan commentedOk, looks good.
Comment #19
Bojhan CreditAttribution: Bojhan commentedDries looked at this, but it doesn't work, also its not an overlay only bug.
Comment #20
seutje CreditAttribution: seutje commentedstyling wasn't applied to
li.active-trail a
but only toli a.active
attached patch adds the selector for the active trail
I don't think another
#toolbar div.toolbar-menu ul li.active-trail a:hover { ... }
is needed, so I didn't add that
Comment #21
seutje CreditAttribution: seutje commentedupsydoodle
Comment #22
David_Rothstein CreditAttribution: David_Rothstein commentedIn Firefox, at least, I am not seeing any problem whatsoever except when the overlay is enabled. Please post details and steps to reproduce if there is some specific problem when the overlay is turned off.
Also, the patch in #15 was committed (http://drupal.org/cvs?commit=325074) but the problem does persist, at least partially:
1. When clean URLs are disabled, it doesn't seem to work at all.
2. When clear URLs are enabled, it works, but I'm occasionally seeing a "flash" of the background - that is, if I click on "Modules" (for example), the background of that link will turn light gray, then turn black again while the iframe is loading, then turn light gray again after the page load is complete. This doesn't happen always, maybe 25-50% of the time though.
Comment #23
seutje CreditAttribution: seutje commentedmoved #20 to #707070: Top level IA items don't keep their active styling when they are in the active trail but not the active item
Comment #24
pwolanin CreditAttribution: pwolanin commented#20: toolbar-active-trail-styling.patch queued for re-testing.
Comment #25
casey CreditAttribution: casey commentedSo what's left?
Comment #26
casey CreditAttribution: casey commentedPatch makes it work when clean URLs is disabled.
Patch also will set active class on links that are in the active trail. E.g. admin/user when visiting admin/user/permission.
Comment #27
aspilicious CreditAttribution: aspilicious commented1) I tested the patch with and without clean urls (in several browser: IE, chrome, firefox).
It does what it is saying it does
==> OK
2) With this patch we have the same behaviour inside and outside the overlay (when it comes down to active links)
==> OK
3) The code for the links that are in the active trail looks sane
==> OK
Marking this rtbc
Comment #28
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD.
Comment #29
casey CreditAttribution: casey commentedPrevious patch had a minor regression: the home link was always considered being in the active trail and thus received the active class.
The frontpage will never be loaded inside the overlay so a simple check for an empty path is sufficient.
Comment #30
aspilicious CreditAttribution: aspilicious commentedMy fault.
Hmm Looks good but I'll let someone else rtbc this one ;)
Comment #31
casey CreditAttribution: casey commentedIt needs a comment.
Comment #32
casey CreditAttribution: casey commented- Added comment
- Added trailing slash to test to prevent wrong matches like "admin/content/node" matching "admin/content/node-types".
Comment #33
casey CreditAttribution: casey commentedComment #34
casey CreditAttribution: casey commentedAnyone?
Comment #35
aspilicious CreditAttribution: aspilicious commentedWell, i'll rtbc this again.
Comment #36
casey CreditAttribution: casey commentedStill applies.
Comment #37
aspilicious CreditAttribution: aspilicious commentedStill some problems with shortcuts. With following links.
#overlay=node/add/article
and
#overlay=node/add
If you are in add/article, add is highlighted too
Home icon issue is fixed
Comment #38
casey CreditAttribution: casey commentedSince #20 we also try to set trail links to active. In overlay we just check whether the link is a parent of the active link. Drupal however uses the menu system; parent links aren't always active trail links.
To get this same functionality in overlay will be hard. Lets just commit this patch first.
Comment #39
casey CreditAttribution: casey commentedComment #40
aspilicious CreditAttribution: aspilicious commentedRTBC for the patch just tof ix the anoying home menu issue.
But afterwards put this back to needs work, drupal behvaiour and overlay behaviour should match as good as possible.
If we can access the result of a php function we can (if there isn't any yet) make a function that checks if a link is a parent of an other link.
Comment #41
ksenzeeTo be perfectly honest, I don't think we should be highlighting the active trail in toolbar - I'd rather just see my current location. But I'll leave that up to the UX folks. I'm rerolling the patch in #32, which fixes the immediate Home link issue, and I agree is RTBC.
Comment #42
ksenzeeChasing HEAD (my local copy was out of date).
Comment #43
casey CreditAttribution: casey commentedactive class on Home link should be reset if the overlay closes and the parent location is home.
Comment #44
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.