On Thursday, January 12, 2017 at 8:31:44 AM UTC-8, cboos wrote: > > Hello everybody, > > I took some steps to finalize my migration of Trac to the Jinja2 > template engine, and the results are now visible in several places. > > The latest code is in the jinja2-trunk-r15341 branch: > > https://svn.edgewall.org/git/trac/devs/cboos > https://github.com/cboos/trac.git > > A demo instance is available: > > https://trac.edgewall.org/testing > > (this one also contains my wiki-restyling changes, for good measure) > > The #12649 ticket can be used to report trivial issues you'd find with > Jinja2 (#12640 for the restyling ones). Don't hesitate to create new > tickets for more serious issues, if any. > > It would be nice to get some feedback at this point. You can contribute > by either reviewing the code, or simply by playing around in > t.e.o/testing and report any glitches you'd find there. > > If you have any questions, the mailing list would probably be more > appropriate. Be sure to first go through the following wiki pages, as > they may already contain the answer you're looking for: > > - https://trac.edgewall.org/wiki/TracDev/Proposals/Jinja > - https://trac.edgewall.org/wiki/TracDev/PortingFromGenshiToJinja > > > Known "issues" so far: > > - the branch keeps Genshi templates and Jinja2 templates side by side > (e.g. search.html and jsearch.html); that was helpful during the > development, and can still be useful while reviewing the branch, but I'm > going to go back to the original names soon (jsearch.html -> > search.html), moving a step closer to the merge. > > - I haven't tested the i18n support for Jinja2 templates in plugins > yet; this is what I'm going to work on next > > > Also, I want to address the concerns raised last year about the backward > compatibility with Genshi. I propose to use the whole 1.4.x series as a > transition period, during which both template engines will be supported. > The plugins making use of Genshi templates won't need to be changed a > bit, while those which want to port to or start using Jinja2 templates > will have to use a new API: `IRequestHandler.process_request` methods > will have to return a `(template, data)` pair instead of the legacy > `(template, data, None)` triple. There's slightly more to it than this, > but you get the idea. > > I've also taken into account the plugins which inject content in > generated pages via the ITemplateStreamFilter interface. That way is > deprecated in favor of using JavaScript for that purpose, but the > interface will nevertheless be supported during the transition period as > well. > > One problem is that this ITemplateStreamFilter support mostly works, but > is not perfect, and of course kills most of the speed improvement > brought by the switch to Jinja2. Consider this as an incentive to > migrate such plugins! If people are really motivated to fix/enhance this > aspect, feel free to do so, but I feel it's somewhat counter-productive > to invest more energy there. > > I hope we can soon finalize the integration of this effort, before we > make more serious moves on the Python3 topic (also, Jinja2 brings in six > as a dependency). > > -- Christian >
Some JavaScript issues noted so far: * Missing group toggle checkbox on these tables: /admin/ticket/components, /admin/ticket/milestones, /admin/ticket/versions, /admin/versioncontrol/repository * Missing group toggle feature on permissions table (#11417) * Divs for plugins are not foldable on /admin/general/plugin Also: * On /roadmap, "Hide milestone with no due date" doesn't seem to stick, though the submitted value appears to be effective in filtering the milestones * Some margin above "Repository Index" h1 on /browser page might be good * "Visit", "View revisions", "View diff against" options on /browser page might look better with bigger or different font * Name input on /admin page could be made same width as URL input (General: Basic Settings) * Very minor preference: I like having just the box-shadow around the label for the folding links (e.g. Attachments on ticket page), rather than a border + box-shadow. Similarly for the folding links on the plugin admin page where the corners of the box at least look too square, might be better with a box-shadow and/or rounded. Unrelated, it was a long time before I noticed the "View changes..." button on the bottom of the /browser page. I think this has been discussed in a ticket, but maybe that button should be made a link in the context nav? I'll do more testing later today, or in coming days. - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/trac-dev. For more options, visit https://groups.google.com/d/optout.
