Problem/Motivation

The cuntextual trigger icon (pencil) is ruggered (when displayed in Bartik) especially on a non-white background.

Also the icons are too close to the right (only 2px distance).

Before:

ruggered trigger icons

After:

trigger icon after change

Before:

open trigger icon

After:

Proposed resolution

Set correct border radius, remove border. Set a little bigger right distance.

Remaining tasks

Contributor tasks needed
Task Novice task? Contributor instructions Complete?
Manually test the patch Novice Instructions
Embed before and after screenshots in the issue summary Novice Instructions Complete

User interface changes

Smoother trigger icon display.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thamas’s picture

Issue summary: View changes
FileSize
80.86 KB
thamas’s picture

Status: Active » Needs review
FileSize
1.33 KB

Here is the patch. :)

thamas’s picture

Issue summary: View changes
marabak’s picture

I've tested your patch on a mac :

on chrome 38.0.2125.101
on safari 7.0.6 (9537.78.2)
on firefox 32.0.3

every think works like charm :)

maybe someone should test too on a PC.

thamas’s picture

Thanks marabak! RTBC? :)

marabak’s picture

Status: Needs review » Reviewed & tested by the community

ok, i read your patch - its only about changing left/right and border-radius css attributes - i think it will work on PC too :)

you've shown me how to review a patch at Drupalcon Amsterdam, so i must be very careful since my mentor is watching :D

thamas’s picture

:) Thank you! I'm proud!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: improve-trigger-icon-display-2352857-2.patch, failed testing.

zaporylie’s picture

Status: Needs work » Reviewed & tested by the community

It looks ok. Only changes in CSS - shouldn't be a problem for testbot.

thamas’s picture

Yup. First time it passed the test… Should be OK.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.0.x. Thanks!

  • webchick committed b983fad on 8.0.x
    Issue #2352857 by thamas: Fixed Improve the display of trigger icon (...
thamas’s picture

:)

Wim Leers’s picture

Status: Fixed » Active
Issue tags: +CSS, +CSS novice

Unfortunately this has caused a regression, which is even visible in the issue summary. Look at the top left part of the contextual links triggers of the original (https://www.drupal.org/files/issues/d8-trigger-icon.png) versus the new (https://www.drupal.org/files/issues/d8-trigger-icon-after.png). You'll see that it's almost impossible to discern. This looks plain broken.

This is probably because the border was removed.

thamas’s picture

Status: Active » Fixed

Wim I disagree. The icon absolutely recognizable, usable and because of the box shadow the full circle is visible. I do not think we need a stronger border. It is smooth.

And the border makes the display (more) ruggered (that is why I removed it).

webchick’s picture

Status: Fixed » Needs review

Since tkoleary designed this, I'll ping him to take a look. For now though I've rolled the patch back because I'm concerned we may have introduced an accessibility regression here with the lack of contrast on the white background.

  • webchick committed e36f35c on 8.0.x
    Revert "Issue #2352857 by thamas: Fixed Improve the display of trigger...
thamas’s picture

OK, let's wait tkoleary's opinion. But I'm sure it is not an accessibility regression. The pencil icon totally accessible, it did not change and the circle around it is still visible just not so ringing.

(If the decision would be that it should have more contrast I recommend not to use box-shadow and border together. Chose one or the other.)

tkoleary’s picture

@thamas

I see what you mean about the shadow and I agree, but I have a different take on it. After living with this for some time since I initially designed it I have a few thoughts on the design as well as the current implementation.

  • When edit mode is toggled on and there are several buttons on the screen the size of them creates too much visual noise
  • The shadow effect does not really aid the separation from the background and the gradient+radius just makes it look "muddy". It also conflicts with the dropdown
  • The square focus effect on a circular button fills my heart with grief

Webchick is correct that the change in your patch is an accessibility regression but I think we can be both more modern and more accessible if we simply remove the shado entirely and darken the border like so:

.contextual .trigger {
border: 1px solid #ccc;
/* box-shadow: 0px 3px 0px rgba(0,0,0,0.2); */
}

I think the other issues may be small enough to handle in this patch as well.

1 we can mitigate the excessive noise of too many buttons by reducing the size of them by 2px:

.contextual .trigger {
height: 26px !important;
width: 26px !important;
}

On hover we keep the dark grey icon:

.contextual .trigger:focus, .contextual .trigger:hover {
background-image: url(http://s348d2a336e2faea.s3.simplytest.me/core/misc/icons/787878/pencil.svg);
}

But on focus use the blue icon and remove the outline:

.contextual .trigger:focus, .contextual .trigger:hover {
background-image: url(http://s348d2a336e2faea.s3.simplytest.me/core/misc/icons/5181c6/pencil.svg);
outline: none;
}

With the above the changes

The normal state should change from this:

normal now

To this:

normal new

The hover state changes from this:

hover now

To this:

hover new

The Focussed state changes from this:

focus now

To this:

focus new

And the Pressed state changes from this:

Only local images are allowed.

To this:

Only local images are allowed.

thamas’s picture

@tkoleary thanks for your support. So we won't use box-shadow and border together.

Here is the new patch with all the changes you recommended.

(It makes the changes as it can be seen tkoleary's screenshots, should we add new screenshots?)

thamas’s picture

Here is an other patch which makes the changes from tkoleary but removes the trigger icon border in the header and footer of Bartik. (The interdiff.txt shows the difference to patch-2. Patch-21 and patch-22 only differ in the two added lines in Bartik's style.css).

(I recommend to open the attached images in full size to see the difference.)

Here is the current state:

This is how trigger icons are displayed after the changes from tkoleary (patch-21):

And after applying this patch-22 (smoother icons in header and footer!):

zaporylie’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
3.7 KB
5.32 KB

Since this issue touches core CSS, I've checked Stark theme for regression. Everything works good.

tkoleary’s picture

Status: Reviewed & tested by the community » Needs review

Awesome. Nice work.

From a design and usabiltiy perspective I think it's RTBC.

@wim-leers code review?

Wim Leers’s picture

Only one extremely silly nitpick before I can re-RTBC this:

+++ b/core/themes/bartik/css/style.css
@@ -1662,6 +1662,8 @@ div.password-suggestions {
+#footer-wrapper .contextual .trigger { border: none; }

We always put the statements on a new line.

thamas’s picture

Not always :)

Exceptions and slight deviations

Large blocks of single declarations can use a slightly different, single-line format. In this case, a space should be included after the opening brace and before the closing brace.

https://www.drupal.org/node/1887862#format

But it is just on single declaration wit two selector line, so it can be changed… What could be more important is to add a comment about the code. So if these are really needed I can reroll the patch a little bit later.

Wim Leers’s picture

Status: Needs review » Reviewed & tested by the community

Aha! :) I couldn't find any such example in Bartik's style.css, so I assumed that was the rule.

RTBC then — thanks!

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Actually looked a bit weird to me too, so I just changed that on commit. ;)

Committed and pushed to 8.0.x. Thanks!

  • webchick committed 816c9c5 on 8.0.x
    Issue #2352857 by thamas, tkoleary: Fixed Improve the display of trigger...
thamas’s picture

I'm glad that it is fixed!

StuartJNCC’s picture

Status: Fixed » Active

Updated to latest HEAD this morning (Wed 2014-Oct-15) - so this patch is in - and Quick Edit function has entirely vanished. No pencil icon in menu bar, no trigger icons.

  • Checked that QuickEdit module is there and active under Extended.
  • Logged in as Admin user 1 - so I have the necessary permissions.

Of course, I have no evidence that this patch is the one responsible! But it is the only one I can see that has been committed since Monday (when it last worked) that touches QuickEdit.

webchick’s picture

Status: Active » Postponed (maintainer needs more info)

Hm. Quickedit is working for me in the latest 8.0.x branch (at least in Chrome). Can you provide more info on what's broken for you? Browser? Errors in JS console? etc.

StuartJNCC’s picture

Status: Postponed (maintainer needs more info) » Fixed

I did a re-install today with the latest HEAD and that fixed the problem. Pencil icons are back and Quickedit works.

Again, no idea what changed!

Wim Leers’s picture

I bet it was the browser cache :)

Status: Fixed » Closed (fixed)

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