#11317 closed enhancement (fixed)
Allow navigation items to be added through the mainnav or metanav sections
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.2 |
Component: | general | Version: | |
Severity: | normal | Keywords: | navigation |
Cc: | leho@… | Branch: | |
Release Notes: |
Added configurable features to the navigation:
|
||
API Changes: |
Added the |
||
Internal Changes: |
Description (last modified by )
As mentioned at the bottom of the TracNavigation page, NavAddPlugin or MenusPlugin are still needed in order to add items to the navigation bars. It would be nice to be able to add new items that are defined in the mainnav
and metanav
sections, and without the use of plugins.
Two other features to consider:
- NavAddPlugin allows a permission to be specified for controlling visibility of the nav item.
- It would be useful to allow items to be moved between the metanav and mainnav by putting to item to the corresponding section of trac.ini (
[mainnav]
and[metanav]
).
Attachments (0)
Change History (18)
comment:1 by , 11 years ago
Cc: | added |
---|
comment:3 by , 10 years ago
Replying to lkraav <leho@…>:
what are we thinking here @rjollos? probably an admin panel? or just imnproved handling of unknown
[mainnav]
config items?
First, providing support for adding unknown [mainnav]
items. Eventually, add an admin panel.
comment:4 by , 10 years ago
th:NavAddPlugin is working well for me so far. shouldn't be difficult to import that code into core. are you aware of any shortcomings with it?
comment:5 by , 10 years ago
Unfortunately the code in th:NavAddPlugin doesn't provide a useful starting point. One major defect is that the active navigation item is not highlighted (th:#592). When implementing the feature in Trac we'll need to define the extra navigation items in the [mainnav]
and [metanav]
sections. The code will need to be implemented in Chrome.prepare_request().
I have a PoC of the feature that I'll post in a short while along with some issues that need to be solved.
comment:6 by , 10 years ago
Initial implementation in log:rjollos.git:t11317. The active navigation item is not highlighted, so more work is needed.
comment:7 by , 9 years ago
Owner: | removed |
---|
comment:8 by , 9 years ago
Milestone: | next-dev-1.1.x → next-dev-1.3.x |
---|
comment:9 by , 8 years ago
Description: | modified (diff) |
---|
comment:10 by , 8 years ago
Description: | modified (diff) |
---|
comment:11 by , 8 years ago
- DONE Edit 1.3/TracNavigation@2
- DONE Edited 1.3/TracInterfaceCustomization@2 and 1.3/TracInterfaceCustomization@3.
- DONE Edited 1.3/TracUpgrade@7
- DONE Edited wiki:NavAddPlugin@35 and wiki:NavAddPlugin@36.
comment:12 by , 8 years ago
Milestone: | next-dev-1.3.x → 1.3.2 |
---|---|
Owner: | set to |
Status: | new → assigned |
comment:13 by , 8 years ago
Proposed changes in [c5641582/rjollos.git].
- I'll add more test coverage before committing changes.
- Documentation has been updated to describe the new features, see comment:11.
The changes include a new method ComponentMeta.deregister
. This aims to be a replacement for EnvironmentStub.clear_component_registry
and EnvironmentStub.restore_component_registry
. The downside to using those methods is that all components are removed from the registry, including those you may want to be active in the test case. clear_component_registry
must be called after the EnvironmentStub
is activated, so it doesn't allow selectively enabling/disabling components through the arguments to the initializer, instead it's necessary to call EnvironmentStub.enable_component
or define the test component class after the registry is cleared. With ComponentMeta.deregister
we can just cleanup the test components at the end of the test case, in tearDown
or tearDownClass
, and selectively enable/disable the built-in components that we want to be visible in the test case.
comment:14 by , 8 years ago
More tests and fixes in [01e17f99/rjollos.git] (log:rjollos.git:t11317_navadd.1). The active menu item is only highlighted when the path matches the href
attribute.
comment:15 by , 8 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed to trunk in r15777.
comment:17 by , 5 years ago
Release Notes: | modified (diff) |
---|
comment:18 by , 5 years ago
Release Notes: | modified (diff) |
---|
what are we thinking here @rjollos? probably an admin panel? or just improved handling of unknown
[mainnav]
config items?