Losing sleep because you can't right-click to get an actions menu in your search results?

Publié
2010-12-15 13:48
Written by
kylejaster - member of the CiviCRM community - view blog guidelines

I figured you'd be as worked up about this as I have been - but rest easy friend-o, 'cause we've got some good medicine coming your way.

 

I've been struggling with the lack of right-click support for the context menus as of 3.2. There's been a fair amount of complaint about it (from what I gather) and the context menu solution that was in place was sub-optimal for a variety of reasons, the greatest being that it didn't allow the user to right-click an action to open it in a new window (a very common behavior if you use CIviCRM on a regular basis). So I did some research and came up with a solution that I think is a significant improvement over the current solution, but it *is* fairly different, and I wanted to address the differences ahead of time so that we can make changes (if necessary) before the release. I shall portray it to you in three acts:

 

First, the improvement:

 

Right-clicking an actions menu in CiviCRM

 

Thar she blows! You can right click on context menus.

 

The change: You don't *right-click* to open the actions menu - you *left-click*. I wasted a bunch of time trying to get the double right click behavior to work, and then I got to thinking: "hey, why do we have to right-click?" I find left clicking is less daunting for people, and it greatly increases the "findability" of the actions menu. Hopefully this will mitigate the third and final act:

 

The drawback (possibly):

 

Alt text for rows, and the missing 'more' menu item

 

What?!?!?! That's right - we've lost the "more" menu item. This is probably a function more of my lack of time and non-mastery of javascript, but basically having the more link cause a bunch of weird issues where you could end up having two actions menus and/or the view/edit links would behave somewhat oddly. The main disadvantage now is that it's not immediately obvious that there is a way to perform more actions from the search results, but the big advantage is that we get an extra 45px worth of *real data* per row by shrinking the actions menu column. We also (hopefully) save people the time of moving the mouse all the way from the left of the main column (where the search fields and buttons are) to the far right edge of the column by letting them access *all* of the available actions from anywhere in the row.

 

If somebody wants to jump up and figure out a fix, I'd be happy to see it, but I have to say that I've been playing around with this for a few days and I think this is actually better. If you'll note in figure 2 that there is also fairly visible alt text on every row that states you can "Click anywhere in the row for an actions menu." - I feel that this is sufficient, but am open to others who may disagree.

 

Questions/Comments/Concerns? Feel like you can finally rest easy? Why don't you go pull a fresh copy of your favorite Open Source CRM from trunk and test it out for me :)

 

 

Filed under

Comments

Kyle - this looks very good, thanks for working on this improvement. 

Does this change benefit custom searches too? Or any other screens with a context menu? 

 

What is the behavior if the search results include hyperlinks and/or email addresses in the result data?  A user may expect left-click to open the hyperlink or start an email message. 

 

 

 

Unfortunately we found some issue with these modifications during the QA cycle and there's not enough time to fix them prior to the upcoming 3.3.2 release which we hope to have out next week.

Personally I'm a bit concerned about having significant inconsistency in how mouse-clicks behave on the Contact listings vs. other listings (which have more > and don't support either right or left click elsewhere in the rows to get the drop-down menu).

I'm wondering if we shouldn't just get rid of the right-click drop-down menu behavior on the Contact listing. This means they would work like all the other lists - you'd need to move your mouse over to the "move >" link on the right side to get the actions dropdown. Do other folks find the "convenience" of being able to right click anywhere on the row to be truly useful? Do many folks actually use that feature now?

what if we added an icon (like a gear or wrench -- something communicating "tools") to the right of the view/edit links to "fake" the former "more" link. since the context menu will popup if any portion of the row is clicked, this would just help people realize the presence of more options.

 

one drawback is that this type of behavior can mess up one's ability to highlight and copy text. for example if i run a search and want to copy the phone number -- the left click would trigger the popup and probably disrupt my ability to highlight the text.

The issue is if you want the context menu to work on a <td> you can't also have regular clicking work. It's annoying, specifically because it makes adding context menu on the more link impossible without adding *another* <td>, just for the more link.

 

highlight and copy text works fine though :)

What is going to happen if the first column contains a link to the contact, the second to her employe, the third is a ajax goodie that change the whatever...

 

All that is triggered by a left click (obviously). What does happen with your menu?

 

While we are taking out action links, what about getting rid of view and edit as well (or at least replace them by an icon)

 

X+

Anonymous (non vérifié)
2010-12-17 - 04:30

Nice work! But a word of warning...

I implemented a more kludgy fix to this problem a few months ago (screenshots at end of http://forum.civicrm.org/index.php/topic,15528.0.html if you're curious, but the lack of responses suggests my idea is less popular!). Unfortunately, any method of opening extra tabs further exposes a nasty pre-existing bug still not fully fixed.

There are a number of places where, if you open contacts (and other entities) in multiple tabs, CiviCRM's session handler gets confused and saves certain types of changes to the last contact you opened. Many instances of this bug are fixed, but an unknown (or, unpublished) number remain. It's definitely still a bug for adding notes as of 3.3.1 - if you open multiple contacts in separate tabs, then add notes for each of them, each note is maddeningly saved to the last contact you opened. Argh!! http://forum.civicrm.org/index.php/topic,17219.0.html

When you make opening contacts in multiple tabs easy, you need to make the awkward decision on whether to drill staff to remember certain arbitrary scenarios where they need to remember to avoid using this, or, you need to be ready for a large amount of data fixing and a lot of complaints from staff (more likely, both!).

More maddeningly, there doesn't seem to be any info anywhere on how to fix new instances of this bug, despite it being a known bug since March and partially fixed since the end of summer. I've been pestering IRC with no joy. Links most welcome... urgh...

Anonymous (non vérifié)
2010-12-17 - 04:27

re: "Why don't you go pull a fresh copy of your favorite Open Source CRM from trunk and test it out for me :)"

Maybe I'm ignorant of how Civi organises these things - where would we find your code to try out?

GAF_DA (non vérifié)
2011-02-16 - 12:44

And come to find out the solution was always there... (hurray Jason for figuring this out!)
Although, in the CiviCRM contact list, you can no longer simply right-click on a contact to access the menu to open in new tab, new window etc. you CAN do the following:
Press CTRL key and LEFT click to open contact in a new tab
Press SHIFT and LEFT click to open contact in a new window
In Firefox (but not I.E.): Press ALT and left click to download the contact's page (equivalent to "save target as" - it opens the page then saves it as an html with no stylesheet).