Modify

Opened 7 years ago

Closed 2 years ago

#1378 closed enhancement (wontfix)

Merge NavAddPlugin with NavHiderPlugin

Reported by: anonymous Owned by: otaku42
Priority: low Component: NavAddPlugin
Severity: minor Keywords:
Cc: Trac Release: 0.10

Description

I think it makes sense to merge NavAddPlugin with NavHiderPlugin. That would allow completely custom navigation bars, just by editing the mainnav and metanav lines under [trac] in trac.ini. Is there a way to suggest that these features get ported to the Trac mainline?

Attachments (1)

navasd.py (2.2 KB) - added by dx 6 years ago.
merged plugins

Download all attachments as: .zip

Change History (8)

comment:1 Changed 7 years ago by anonymous

  • Type changed from defect to enhancement

comment:2 follow-up: Changed 7 years ago by otaku42

  • Resolution set to wontfix
  • Status changed from new to closed

Personally, iirc I don't like NavHiderPlugin, as it relys on CSS to hide the buttons, rather than really "removing" them from the HTML source.

I have a patch for Trac available, that allows to hide buttons by specifying their names in trac.ini directives. However, the current version of the patch is far from being optimal, as every component of Trac and plugins require to be adjusted to support this functionality.

A better idea would be to extend the method that actually adds buttons to either bar such that it won't add buttons that have been turned off. I just need to find the time for it. Once the new version of the patch is finished, I'd submit it for inclusion in Trac mainline.

comment:3 in reply to: ↑ 2 Changed 7 years ago by coderanger

Replying to otaku42:

Personally, iirc I don't like NavHiderPlugin, as it relys on CSS to hide the buttons, rather than really "removing" them from the HTML source.

This is incorrect. The NavHiderPlugin removes the entries from HDF before it ever gets to HTML.

comment:4 Changed 7 years ago by otaku42

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Oh, sorry then, seems I've confused NavHiderPlugin with something else. In that case I agree that merging both plugins would be a good idea. I'll try to look at it ASAP.

comment:5 Changed 6 years ago by dx

I had some problems with both plugins, navhider stopped working when navadd was enabled. So i tried to merge both plugins... and it was just copypasta. Attached filter.py

Changed 6 years ago by dx

merged plugins

comment:6 Changed 6 years ago by dx

It still requires cleanup, for example, the class name is from NavHider, and it still shows a navadd entry in web admin. I don't know anything about trac plugins, and if i change something it could stop working..

BTW, great plugins.

comment:7 Changed 2 years ago by rjollos

  • Resolution set to wontfix
  • Status changed from reopened to closed

As noted on the NavHiderPlugin page, the plugin is deprecated and the functionality is built-in to Trac 0.11 and later. See t:TracNavigation for more info.

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from otaku42. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.