[xwiki-devs] [Proposal] Default edit mode for a page
vincent at massol.net
Thu Mar 24 22:49:37 UTC 2011
On Mar 24, 2011, at 11:33 PM, Eduard Moraru wrote:
> On 03/24/2011 07:28 PM, Luca Anca wrote:
>> Hi all,
>> starting from the need of the dashboards, to specify the default edit
>> mode for a page, here's how I would like to implement it, in the
>> following days.
>> There is already a mechanism for this, which works like this: if,
>> document A includes sheet B and sheet B has an object of type
>> "XWiki.SheetClass", then clicking the edit button of document A will
>> automatically open the edit mode specified in the XWiki.SheetClass
>> object of the sheet B.
>> 1/ I propose an enhancement of the existing mechanism, to allow such an
>> XWiki.SheetClass object to be attached to the document A directly.
>> Namely the edit mode for the document A will be read first from the
>> objects of type XWiki.SheetClass in document A, then if none found, from
>> the objects in the included sheet.
>> 2/ XWiki.SheetClass should be renamed to XWiki.EditModeClass, or
>> XWiki.DefaultEditModeClass, or something alike, that suggests its
>> purpose. Current class name will be deprecated but still preserved for a
>> good while. What would be your name proposals for this?
>> 3/ optionally, we could deprecate the current mechanism, and say that
>> objects should never be attached to sheets anymore, only to pages. This
>> way, the usecase of a sheet should be implemented by adding the
>> EditModeClass object in the template from which docs are created, so
>> that it can be easily propagated to a set of documents.
>> I am not against the current mechanism, I think it's a nice helper, and
>> the replacing implementation has the drawback of making it mandatory to
>> create documents through templates, or manually adding this object in
>> the doc creation code. Therefore, I would be -0.5 on this.
>> 4/ optionally, add an edit mode panel (or whatever we want to replace
>> them with) to change this from a nice UI. This can turn out useful in
>> cases when such an edit object is added automatically (e.g. dashboards)
>> and when it's no longer needed (dashboard macro call is deleted from the
>> page), the default edit mode still stays the one set automatically. This
>> is very optional, as I see little cases when users would delete just
>> the macro call, and not the page as a whole.
>> devs mailing list
>> devs at xwiki.org
> +1 for the idea.
> As a side note, I`d like it if we went even further with this and create
> a "Page Preferences" section, just like we have for space and wiki,
> where we could specify things like default edit mode or whatever wiki or
> application specific stuff. These preferences would materialize in
> objects being added to the current page.
Indeed, I thought about this too but in the end I thought that it would be better to have specific objects for each "preference" that is required instead of a single large do-it-all preference object.
More information about the devs