On Fri, Aug 9, 2013 at 11:16 AM, Gary Martin <[email protected]>wrote:

> On 09/08/13 19:04, Joachim Dreimann wrote:
>
>> On 9 August 2013 18:56, Alice Ellmer <[email protected]> wrote:
>>
>>  Hello everyone,
>>>
>>> I'm trying to customize my main navigation menu.
>>>
>>> First, adding more menu items doesn't seem possible without a plugin
>>> at the moment:
>>>
>>> http://trac.edgewall.org/wiki/**TracInterfaceCustomization#**
>>> CustomNavigationEntries<http://trac.edgewall.org/wiki/TracInterfaceCustomization#CustomNavigationEntries>
>>>
>>> which is in itself perhaps an issue that Bloodhound might want to
>>> improve over Trac.
>>>
>>> Using the NavAdd plugin 
>>> (http://trac-hacks.org/wiki/**NavAddPlugin<http://trac-hacks.org/wiki/NavAddPlugin>),
>>> I
>>> added more items to my main nav as such:
>>>
>>> [navadd]
>>> add_items = newbug,newtouchup
>>> newbug.title = New Bug
>>> newbug.url = /nearwoo/newticket?type=bug
>>> newtouchup.title = New Touchup
>>> newtouchup.url = /nearwoo/newticket?type=**touchup
>>>
>>> [trac]
>>> mainnav = newbug,newtask,tickets,search,**admin
>>>
>>> but the order of the new entries is ignored and the extra entries
>>> (newbug, newtouchup) are pushed into a dropdown menu labeled "more"
>>> top the right of tickets.
>>>
>>> To give the admin a little more control over the elements on mainnav,
>>> it seems like exposing mainnav in trac.ini would be a reasonable thing
>>> to do.
>>>
>>> Best,
>>> -- Alice
>>>
>>>  I agree Alice, exposing that via trac.ini seems sensible. The main
>> reason
>> for the current approach of putting everything into the 'More' drop down
>> was to have a good, clean, predictable user experience out of the box. If
>> you find that the meta-nav to become unwieldy too quickly once you add
>> your
>> own items (because of our styling or spacing decisions), we're open to
>> suggestion on how to improve it further.
>>
>> Welcome to the dev@ list!
>>
>> - Joe
>>
>>
> I think that the More drop down is useful but I would be very happy to see
> users being able to assume control over what is outside of it.
>
> Cheers,
>     Gary
>

As an example of one direction we could go, the MenusPlugin allows full
control from trac.ini to create hierarchical sets of navigation items. With
a similar approach, even the "More" item could be defined in trac.ini.

http://trac-hacks.org/wiki/MenusPlugin

At least for the time being though, exposing `mainnav_show` through
trac.ini seems like a good approach, as Gary suggested on IRC. We could
also expose `mainnav_to_meta` and `metanav_hide` if those seems like useful
configuration parameters for our users to control. I would probably choose
to just add `mainnav_show`.

Reply via email to