[Zope3-dev] menu item ordering

Guido van Rossum guido@python.org
Thu, 24 Apr 2003 11:27:09 -0400


> On the topic of usability, I've noticed that menu items (e.g. zmi_views,
> zmi_actions) appear to be ordered in arbitrary ways (at least, I
> confess, I don't see the pattern).

I think there's a default ordering which goes from most specific to
least specific.  This is useful (we hope) for e.g. the "tabs" where
the tabs specific to the object type at hand are on the left and generic
tabs that apply to all objects on the right.  E.g. when viewing
++etc++site, the "Services" tab (which applies only here) is on the
left, and the "Introspector" tab (which applies to *all* objects
AFAICT) is on the far right.  In between are tabs of medium
applicability.

> - Can the order of these items be precisely controlled?

For the "Add service" menu I managed to get them in alphabetically
sorted order.  This is done in zope/app/browser/container/adding.py,
class Adding, method addingInfo().  I suppose each of the menus has
some associated Python code that is used to generate the menu items,
and this code could sort them by whatever key is useful.

> - Is it important to define some sort of standard/recommendation for
> ordering so that users can rely on some UI patterns?

I'd say so, yes.

--Guido van Rossum (home page: http://www.python.org/~guido/)