Edgewall Software

Changes between Version 23 and Version 24 of TracDev/ApiChanges/0.11


Ignore:
Timestamp:
Nov 16, 2007, 11:39:27 AM (17 years ago)
Author:
Christian Boos
Comment:

Restructured the page a bit

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ApiChanges/0.11

    v23 v24  
    22= !TracDev/ApiChanges/0.11 =
    33
    4 '''Note: Development of Trac [milestone:0.11] has started with r3804 and the trunk now uses ''[http://genshi.edgewall.org/ Genshi]'' instead of ClearSilver, for its template engine. Please keep in mind that the information in this page is work in progress.'''
     4'''Note: Development of Trac [milestone:0.11] has started with r3804 and now at r6160 it has reached some stability. We're considering releasing a beta 1 soon.
     5Please keep in mind that the information in this page is ''still'' work in progress (most notably the sections marked with `TBD`).'''
    56
    6 == Caveats for Plugin Developers ==
    7 
    8 The Trac macros will need to be adapted:
    9  - the old-style wiki-macros are not supported anymore (due to the drop of ClearSilver and the HDF); they need to be converted to the new-style macros
    10 
    11 == Migrating away from Clearsilver ==
     7== New Dependencies ==
     8=== Genshi ===
    129
    1310ClearSilver has proven too limited and “uncomfortable”, so research for better alternatives was done. The [http://kid-templating.org/ Kid] templating language was unanimously found appealing, to the point that ChristopherLenz did a port of Trac to Kid during the development of DrProject (a fork of Trac). This in turn was found painful, and prompted Christopher to start his own, enhanced, version of Kid currently maturing as [http://genshi.edgewall.org/ Genshi].
     
    1714You can start porting your plugins [TracDev/PortingFromClearSilverToGenshi from Clearsilver to Genshi].
    1815
    19 == Advanced JavaScript Support ==
     16=== jQuery ===
     17Advanced JavaScript Support
    2018
    2119[http://jquery.com jQuery] is included in Trac, and it is advised to use this library when writing JavaScript code.
    2220
    2321
    24 == Date and Time Manipulations ==
     22== Modifications made to the 0.10 API ==
     23
     24=== Date and Time Manipulations ===
    2525
    2626Since r3935, Trac uses `datetime` objects internally, instead of timestamps.
     
    3131Those utilities automatically take into account the ''timezone'' information set by the user, so that the dates are presented in a meaningful way to him.
    3232
    33 == Interface Changes ==
     33=== Caveats for Macros Developers ===
    3434
    35 === `ITimelineEventProvider` ^[source:trunk/trac/timeline/api.py@head#L87 (0.11)] [source:tags/trac-0.10/trac/Timeline.py@head#L32 (0.10)]^ === #ITimelineEventProvider
     35The Trac macros will need to be adapted:
     36 - the old-style wiki-macros are not supported anymore (due to the drop of ClearSilver and the HDF); they need to be converted to the new-style macros
     37 - new-style macros are [#IWikiMacroProvider] plugins. They can be written as full plugins or simple one file drop-in plugins, see source:trunk/sample-plugins for some examples (TODO: source:tags/trac-0.11/sample-plugins/macros)
     38
     39=== Modified Interfaces ===
     40==== `ITimelineEventProvider` ^[source:trunk/trac/timeline/api.py@head#L87 (0.11)] [source:tags/trac-0.10/trac/Timeline.py@head#L32 (0.10)]^ ==== #ITimelineEventProvider
    3641
    3742First thing, the timeline module has now its own package (`trac.timeline`), and the ITimelineEventProvider interface itself should now be imported from `trac.timeline`. However, note that the case has changed here, as you would previously have imported `trac.Timeline`. If you want to support both versions, try something like this:
     
    6570''Note: support for #1198 and #2293 will likely require adding other methods to that interface''
    6671
    67 === `ISearchSource` ^[source:trunk/trac/search/api.py@head#L17 (0.11)] [source:tags/trac-0.10/trac/search.py@head#L30 (0.10)]^ === #ISearchSource
     72==== `ISearchSource` ^[source:trunk/trac/search/api.py@head#L17 (0.11)] [source:tags/trac-0.10/trac/search.py@head#L30 (0.10)]^ ==== #ISearchSource
    6873
    6974Similar to the timeline package, the search module has also been migrated to a package (`trac.search`), with the same case change. Again, if you want to support both versions, try something like this:
     
    7782}}}
    7883
    79 === `IWikiMacroProvider` ^[source:trunk/trac/wiki/api.py@head#L73 (0.11)] [source:tags/trac-0.10/trac/wiki/api.py@head#L70 (0.10)]^ === #IWikiMacroProvider
     84==== `IWikiMacroProvider` ^[source:trunk/trac/wiki/api.py@head#L73 (0.11)] [source:tags/trac-0.10/trac/wiki/api.py@head#L70 (0.10)]^ ==== #IWikiMacroProvider
    8085
    8186 - `render_macro(req, name, content)` has been deprecated (see r4621)
     
    9297`render_macro(req, name, content)` will likely be removed in [milestone:0.12].
    9398
    94 === `IHTMLPreviewRenderer` ^[source:trunk/trac/wiki/api.py@head#L213 (0.11)] [source:tags/trac-0.10/trac/wiki/api.py@head#L209 (0.10)]^ === #IHTMLPreviewRenderer
     99==== `IHTMLPreviewRenderer` ^[source:trunk/trac/wiki/api.py@head#L213 (0.11)] [source:tags/trac-0.10/trac/wiki/api.py@head#L209 (0.10)]^ ==== #IHTMLPreviewRenderer
    95100
    96101Similar to the above change, `render(req, mimetype ...)` is now `render(context, mimetype ...)`, `context` being a rendering `Context` (see below).
    97102It doesn't matter that much however, as it looks like that this interface is going to be integrated in `IContentConverter` anyway (see #3332 - 0.12 topic unfortunately).
    98103
    99 == New Interfaces, Modules and Classes ==
     104
     105== New in the 0.11 API ==
    100106
    101107Several new interfaces and modules have been added in 0.11.
     
    103109TODO: document the various new trac.util modules.
    104110
    105 === `trac.resource.Resource` ===
     111=== New Classes ===
     112==== `trac.resource.Resource` ==== #Resource
    106113
    107114The '''resource identifier''' class `Resource` is used to specify in a convenient way which Trac ''resources'' is being manipulated.
     
    112119Finally, a resource can be parented in another resource. This relationship usually means that a removal of the parent resource implies a removal of the children resources.
    113120
    114 === `trac.resource.IResourceManager` ===
    115 
    116 The `IResourceManager` let components claim ownership of some realms.
    117 For the managed realms, the manager component will know how to build URLs to access the resources belonging to that realm and will know how to describe those resources.
    118 Various utility functions exist in the `trac.resource` module in order to manipulate the `Resource` identifier objects in a generic way.
    119 
    120 === `trac.mimeview.api.Context` ===
     121==== `trac.mimeview.api.Context` ==== #Context
    121122
    122123The '''rendering context''' class is used to specify ''how'' the content should be rendered.
     
    128129(typical example, ticket information displayed within a Wiki page by the way of a macro).
    129130
    130 === `trac.perm.IPermissionPolicy` ===
     131=== New Interfaces ===
     132==== `trac.resource.IResourceManager` ==== #IResourceManager
     133
     134The `IResourceManager` let components claim ownership of some realms.
     135For the managed realms, the manager component will know how to build URLs to access the resources belonging to that realm and will know how to describe those resources.
     136Various utility functions exist in the `trac.resource` module in order to manipulate the `Resource` identifier objects in a generic way.
     137
     138==== `trac.perm.IPermissionPolicy` ==== #IPermissionPolicy
     139
     140TBD.
     141==== `trac.attachment.ILegacyAttachmentDelegate` ==== #ILegacyAttachmentDelegate
    131142
    132143TBD.
    133144
    134 === `trac.ticket.api.ITicketActionController` ===
     145==== `trac.ticket.api.ITicketActionController` ==== #ITicketActionController
    135146
    136147TBD. See TracWorkflow.
    137148
    138 === `trac.ticket.roadmap.ITicketGroupStatsProvider` ===
     149==== `trac.ticket.roadmap.ITicketGroupStatsProvider` ==== #ITicketGroupStatsProvider
    139150 
    140151TBD.
    141152 
    142 === `trac.web.ITemplateStreamFilter` ===
     153==== `trac.web.ITemplateStreamFilter` ==== #ITemplateStreamFilter
    143154
    144155TBD.
    145156
    146 === `trac.prefs.api.IPreferencePanelProvider` ===
     157==== `trac.prefs.api.IPreferencePanelProvider` ==== #IPreferencePanelProvider
    147158
    148159TBD.
    149160
    150 === `IPropertyRenderer` ^[source:trunk/trac/versioncontrol/web_ui/browser.py@head#L46 (0.11)] ===
     161==== `trac.versioncontrol.web_ui.browser.IPropertyRenderer` ^[source:trunk/trac/versioncontrol/web_ui/browser.py@head#L46 (0.11)] ==== #IPropertyRenderer
    151162
    152163The presentation of version control properties for files and directories can be customized to a great extent.
    153164The revision properties can be customized in a similar way.
    154165
    155 === `IPropertyDiffRenderer` ^[source:trunk/trac/versioncontrol/web_ui/changeset.py@head#L51 (0.11)] ===
     166==== `trac.versioncontrol.web_ui.changeset.IPropertyDiffRenderer` ^[source:trunk/trac/versioncontrol/web_ui/changeset.py@head#L51 (0.11)] ==== #IPropertyDiffRenderer
    156167
    157168Likewise, the presentation of changes for version control properties can be customized.
    158169
    159 === !WebAdmin is now part of the core ===
    160 
    161  * The previously external interface `webadmin.web_ui.IAdminPageProvider` is now a core interface: `trac.admin.api.IAdminPanelProvider`.
    162    Also its `get_admin_pages` method became `get_admin_panels`.
    163 [[comment(some module names, such as {{{trac.Timeline}}} and {{{trac.Search}}}, were de-capitalized, e.g. {{{trac.timeline}}} => see above, there's a full section for each)]]
     170==== `trac.admin.api.IAdminPanelProvider` ==== #IAdminPanelProvider
     171!WebAdmin is now part of the core.
     172The previously external interface `webadmin.web_ui.IAdminPageProvider` is now a core interface: `trac.admin.api.IAdminPanelProvider`.
     173Also its `get_admin_pages` method became `get_admin_panels`.