On 4/8/2010 8:33 AM, Felix Schwarz wrote:

Am 08.04.2010 02:20, schrieb Noah Kantrowitz:
The same goes for streamfilter plugins. What plugins out there are making
good use of this?

Depends on what you define as 'good use' but for Agilo we basically use a lot of interfaces to their maximum extend (and beyond ;-).

We use stream filters to:
- Modify the ticket page
- inject resources in all template

Can you point us to some examples?

In Trac itself, the stream filters could all be replaced with some "placeholders" or defined points of injection of extra xhtml content. Stripping of access keys and injection of form token could both be replaced by functions used in templates.

The stream filter approach is indeed very flexible, but also fragile by design. It's all well and good if the templates don't evolve, but as we're making changes, we can't possibly know which plugins will break, as /any/ part of the content might be relevant for some xpath expression used by a transform filter. On the other hand, if we're adding "extension points" in the templates (the exact form these extensions points could take I don't know yet - Jinja2 informed opinions welcomed), they'll naturally be part of the template's evolution.

Basically we're using Genshi 0.6 so heavily that the current Genshi trunk raises an exception if we run it with the Agilo match templates ;-)

Which I suppose is also a situation you can't be happy with...

-- Christian


fs


--
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en.

Reply via email to