Support from Acquia helps fund testing for Drupal Acquia logo

Comments

David_Rothstein’s picture

Title: Active items in top level IA don't have the light gray background anymore » Active items in top level IA don't have the light gray background when overlay is enabled
Component: Seven theme » overlay.module

Looks like this only occurs when the overlay is showing - disabling the overlay module makes it work again for me.

casey’s picture

Status: Active » Needs review
FileSize
3.39 KB

Ok 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.

casey’s picture

FileSize
3.83 KB

Wrong patch

casey’s picture

FileSize
3.83 KB

replaced windowPath by overlayPath, which is what it is about.

yoroy’s picture

Status: Needs review » Needs work

Thanks, getting better already. :)
activestates

When I click another top level link while already in overlay, the active state does not follow

casey’s picture

Status: Needs work » Needs review
FileSize
3.99 KB

Duh of course! I forgot about that.

Status: Needs review » Needs work
Issue tags: -Usability

The last submitted patch, , failed testing.

Status: Needs work » Needs review
Issue tags: +Usability

Re-test of from comment #2405486 was requested by @user.

casey’s picture

This fix conflicts with patch in #668104: Make overlay respect other click handlers. That one should be reviewed/committed first.

casey’s picture

Status: Needs review » Active

Ok #668104: Make overlay respect other click handlers landed. This issue is almost fixed now:

It isn't working when clean URLs are disabled.

Bojhan’s picture

Status: Active » Reviewed & tested by the community

Doesn't seem to be related, that should be solved in #685790: No Overlay when Clean URLs are off

Bojhan’s picture

Status: Reviewed & tested by the community » Needs review

Oops, needs review still. Can anyone else confirm its working?

casey’s picture

Status: Needs review » Active

Its 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.

casey’s picture

Status: Active » Needs review
FileSize
1.22 KB

This patch makes it also work when clean URLs is disabled.

Status: Needs review » Needs work
Issue tags: -Usability

The last submitted patch, overlayresetactive.patch, failed testing.

Status: Needs work » Needs review
Issue tags: +Usability

Re-test of overlayresetactive.patch from comment #15 was requested by casey.

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community

Ok, looks good.

Bojhan’s picture

Title: Active items in top level IA don't have the light gray background when overlay is enabled » Active items in top level IA don't have the light gray background
Component: overlay.module » menu system
Status: Reviewed & tested by the community » Needs work

Dries looked at this, but it doesn't work, also its not an overlay only bug.

seutje’s picture

Title: Active items in top level IA don't have the light gray background » Active items in top level IA don't have the light gray background when overlay is enabled
Component: menu system » overlay.module
Status: Needs work » Reviewed & tested by the community
FileSize
473 bytes

styling wasn't applied to li.active-trail a but only to li 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

seutje’s picture

Title: Active items in top level IA don't have the light gray background when overlay is enabled » Active items in top level IA don't have the light gray background
Component: overlay.module » toolbar.module
Status: Reviewed & tested by the community » Needs review

upsydoodle

David_Rothstein’s picture

Title: Active items in top level IA don't have the light gray background » Active items in top level IA don't have the light gray background when overlay is enabled
Component: toolbar.module » overlay.module
Status: Needs review » Needs work

In 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.

seutje’s picture

pwolanin’s picture

Status: Needs work » Needs review

#20: toolbar-active-trail-styling.patch queued for re-testing.

casey’s picture

So what's left?

casey’s picture

FileSize
1.02 KB

Patch 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.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

1) 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

-    if (linkDomain == windowDomain && linkPath == activePath) {
+    if (linkDomain == windowDomain && activePath.indexOf(linkPath) === 0) {

==> OK

Marking this rtbc

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD.

casey’s picture

Status: Fixed » Needs review
FileSize
702 bytes

Previous 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.

aspilicious’s picture

My fault.
Hmm Looks good but I'll let someone else rtbc this one ;)

casey’s picture

Status: Needs review » Needs work

It needs a comment.

casey’s picture

FileSize
826 bytes

- Added comment
- Added trailing slash to test to prevent wrong matches like "admin/content/node" matching "admin/content/node-types".

casey’s picture

Status: Needs work » Needs review
casey’s picture

Anyone?

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Well, i'll rtbc this again.

casey’s picture

Still applies.

aspilicious’s picture

Status: Reviewed & tested by the community » Needs work
FileSize
4.89 KB
5.67 KB

Still 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

casey’s picture

Since #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.

casey’s picture

Status: Needs work » Needs review
aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

RTBC 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.

ksenzee’s picture

To 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.

ksenzee’s picture

Chasing HEAD (my local copy was out of date).

casey’s picture

FileSize
849 bytes

active class on Home link should be reset if the overlay closes and the parent location is home.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Usability

Automatically closed -- issue fixed for 2 weeks with no activity.