Better token lists

sirkitree's picture

Has anyone come up with a better way of presenting the list of tokens to users? I'm finding that what I'm doing is really ugly and would love to know if anyone has seen any good examples of how to present tokens in a more usable manner.
Configure an advanced action | Community

Groups:
Login to post comments

three modes I've seen

greggles's picture
greggles - Thu, 2009-02-26 15:18

Crossposted to usability gruop.

The three modes that I've seen people use are:

  1. The one in sirkitree's screenshot in the original post.
  2. Pathauto style: does it's own processing to get a list of tokens that will work for the current scope (e.g. nodes). Reduces the number of tokens somewhat, but not a ton.
  3. Don't include this advice under the field, instead say "You can use tokens here like [foo], [bar], and [baz] or see the detailed help page for more details." Then put the full list in the help page. Ubercart does this in several places.

I've thought some nice additional styles though never implemented them (nor seen them implemented).

  1. A jquery based filter mechanism at the top of that big list.
  2. An autocomplete style mechanism that would be most useful for single line textboxes.

Anything else?

--
Growing Venture Solutions | Drupal Dashboard | Learn more about Drupal - buy a Drupal Book


I think a jQuery text filter

akahn's picture
akahn - Fri, 2009-03-13 18:00

I think a jQuery text filter textarea at the top of the list of tokens would be ideal. Just type in 'menu' and the list is immediately pared down to the ones that contain the text 'menu,' and there's still room for the descriptions below each token. There are jQuery plugins that make this really easy, though I've mostly seen them used on table rows.


Popunder? I'm not sure what

markpeak's picture
markpeak - Thu, 2009-02-26 15:58

Popunder?

I'm not sure what does it call. But the same as Greybox image module. Help dialog popup within the admin page.


Popups

sirkitree's picture
sirkitree - Thu, 2009-02-26 17:04

Yes popups would be good for this. Especially combined with the external help page link as greggles mentioned. I think I'll go that route, but I REALLY like the jQuery filter idea too... hrm...


Something like the jQuery

edkwh - Sun, 2009-03-15 09:24

Something like the jQuery Tag Suggestion plugin (http://remysharp.com/2007/12/28/jquery-tag-suggestion/) perhaps?

As for the long list of tokens, maybe we can follow the how Views allows you to Fields filter by categories.


Here's what I've decided

sirkitree's picture
sirkitree - Wed, 2009-05-06 17:48

Here's what I've decided upon.

First limit the scope. This cuts down on the amount of tokens as Greg suggests in #2 with the Pathauto style.
Then make each type a collapsible fieldset, resulting in the following:
Activity publisher templates | Community


good job!

likewhoa's picture
likewhoa - Thu, 2009-05-07 04:37

I noticed this is what you implemented with activity-2.x, keep up the good work. This method improves productivity by 1000%.


Good to report back on what

yoroy's picture
yoroy - Thu, 2009-05-07 08:43

Good to report back on what you actually chose to do. Thanks. Seems like a fair solution. Presenting long long, very long lists of stuff is a recurring UI problem and I think you picked the right option for this case.

Only issue with this is that the fieldset titles become very important because that is the only thing you get to base your initial choice on. You might consider dropping the repetitive 'tokens' from all nested fieldset titles, it's pretty clear we're administring tokens already, no need to keep saying it. Omit needless words.