Changes between Version 1 and Version 2 of stevegt


Ignore:
Timestamp:
Feb 25, 2006, 4:28:16 PM (18 years ago)
Author:
stevegt
Comment:

wiki edit workflow proposal

Legend:

Unmodified
Added
Removed
Modified
  • stevegt

    v1 v2  
    44
    55[[TagIt(user)]]
     6
     7== Wiki Edit Workflow Proposal ==
     8
     9As wiki SPAM gets worse, as people start using trac for more critical
     10projects, and as I develop the plugin that implements my evil master
     11plan for world domination, there's going to need to be a lightweight,
     12trac-ish way of allowing plugins to do page edit workflow.  I have
     13that need right now.  I want to tackle this, I plan to post the result
     14on trac-hacks.org, but before I spend a lot of time going down a
     15development path, I think I should get some advice as to which path I
     16should take; it's looking more and more like trac itself will need to
     17be patched, and I'd prefer to do this in a way that the patch will
     18likely be accepted into mainstream.
     19
     20There appear to be (at least) two parts to this problem:  (1) The
     21default viewable version of a wiki page needs to be selectable via an
     22extension point, not hardcoded as "highest version number", and (2)
     23the version of the page which a user edits when they hit "Edit This
     24Page" needs to be configurable, rather than "most recent".
     25
     26I'm starting to think that (1) is going to require a change to the
     27!WikiPage class, and (2) a change to !WikiModule. 
     28
     29In !WikiPage, if version number is None then the default action is
     30determined by the ORDER BY sorting in a SELECT statement.  I see three
     31choices here:
     32
     33 * patch !WikiPage to add an IWikiPageVersionSelector extension point
     34      (called before SELECT); this helps anyone implementing workflow
     35 * patch !WikiModule to add an IWikiPageProvider extension point; then
     36      !WikiPage implements IWikiPageProvider; this helps anyone using
     37      alternate wiki page storage and/or workflow
     38 * don't patch the code; just have my own plugin do the job via
     39      overriding and subclassing !WikiModule, reassigning the 'WikiPage'
     40      symbol at runtime, and/or other guerilla tactics; this helps nobody
     41      other than myself
     42
     43In !WikiModule, right now an edit is hardcoded as "latest version" in
     44process_request.  But you'd actually want the "Edit This Page" button
     45to edit the version you're looking at, or maybe the currently elected
     46version, not the latest version.  This probably needs a trac.ini
     47configuration item to control it -- either another patch or another
     48override.
     49
     50Does anyone have any preference as to which of these routes I take?  Feel free to edit this page...
     51
     52
     53