bq. * Make RenderingConfiguration.getTransformationNames() search in
the current page, parent pages (spaces), current wiki, and fallback to
xwiki.properties
The document currently in the XWikiContext when you call
RenderingConfiguration.getTransformationNames() often does not have
much to do with content you are currently executing so it's not a good
criteria IMO. It would make more sense (and be much easier) to have
the display module get this information like it gets the content to
execute and pass the list of transformations to the
TransformationContext (which then end up in the RendereringContext).
On Tue, May 21, 2019 at 2:07 PM Vincent Massol <vincent(a)massol.net> wrote:
Hi devs,
I’d like to discuss about how to control transformations and when they are executed.
Right now we have an all-or-nothing strategy (either the transformation is defined in the
config property or it’s not).
We have some needs to be able to turn on/turn off some transformations on a page level
basis.
Here’s the idea that I put on
https://jira.xwiki.org/browse/XWIKI-15100:
* Add a new xproperty to Rendering.RenderingConfigClass
* Modify java code: XWikiRenderingConfiguration, ExtendedRenderingConfiguration,
DefaultExtendedRenderingConfiguration, RenderingConfigClassDocumentConfigurationSource
* For the wiki level, get the config in Rendering.RenderingConfig
* For the page level, get the config from an xobject of type
Rendering.RenderingConfigClass
* Make RenderingConfiguration.getTransformationNames() search in the current page, parent
pages (spaces), current wiki, and fallback to xwiki.properties
Note that, as Thomas pointed out in comment of
https://jira.xwiki.org/browse/XWIKI-15100
the last point is the hard one. We could imagine having a transformation cache that would
be loaded at startup and updated whenever a XWiki.RenderingConfigClass xobject is modified
in the wiki. Very similar to wiki components.
Note: We could also implement
https://jira.xwiki.org/browse/XWIKI-13167 at the same time,
with the query string in the URL overriding the transformations.
WDYT?
Any idea of the cost of adding such a feature in term of days? Does 7 days sounds good to
you? (inluding testing and doc).
Thanks
-Vincent