[xwiki-devs] [Discussion] Where does livetable belong?
Hi devs, While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space. Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)? Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web. The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included. IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us. I currently see two directions: 1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty. 2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources. I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area. WDYT? Thanks, Eduard ---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik...
I only have one point for the discussion. AppWithinMinute create a page that uses livetable if I recall well. If AWM is in the core then livetable should be too (but I don't know if AWM is in the core). Thanks, On Tue, Oct 14, 2014 at 10:52:39PM +0300, Eduard Moraru wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org
By "core" Edy mean pretty much only the WAR in an empty database from what I understood. AWM is a fully XAR extension technically on which nobody depends except applications created with it AWM. On Wed, Oct 15, 2014 at 9:58 AM, Jean SIMARD <[email protected]> wrote:
I only have one point for the discussion.
AppWithinMinute create a page that uses livetable if I recall well. If AWM is in the core then livetable should be too (but I don't know if AWM is in the core).
Thanks, On Tue, Oct 14, 2014 at 10:52:39PM +0300, Eduard Moraru wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Jean Simard [email protected] Research engineer at XWiki SAS http://www.xwiki.com Committer on the XWiki.org project http://www.xwiki.org _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Personally I tend to 1), because I think displaying lots of data in a way that scales well should be a core feature of a wiki - and livetable does just this. Maybe something like having l;ivetable as a "default implementation" which in principle can be overriden by something else would be nice, but I have no idea how to do that. Then I am also somewhat biased towards 1) as I got stuck with the aforementioned issue because the current way is not 1), and that kept me from solving the issue - I neither found the time to wrap my head around the extension point stuff, nor did I really want to write two different solutions (with / without livetable). In my experience this ends up like having a separate "noscript" implementation for some feature - everybody thinks it is good to have it, but actually hardly anyone uses it and thus it usually goes into neglect and disrepair. Then my argument boils down to laziness, so I cannot say I made a strong case ;) Clemens On 10/14/2014 09:52 PM, Eduard Moraru wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
mit freundlichen Grüßen Clemens Klein-Robbenhaar -- Clemens Klein-Robbenhaar Software Development EsPresto AG Breite Str. 30-31 10178 Berlin/Germany Tel: +49.(0)30.90 226.763 Fax: +49.(0)30.90 226.760 [email protected] HRB 77554 B - Berlin-Charlottenburg Vorstand: Maya Biersack, Peter Biersack Vorsitzender des Aufsichtsrats: Dipl.-Wirtsch.-Ing. Winfried Weber Zertifiziert nach ISO 9001:2008
Edy, you're mixing two things: (1) The live table widget. This is currently provided by xwiki-platform-web. The widget has some HTML template (currently in macros.vm), some JavaScript code (livetable.js) and some CSS (livetable.css). The widget is configurable. The main configuration option is the data source. As written on http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParame... you can specify the data source either using the 'resultPage' or the 'url' parameter. What's important is that it can use **any** data source. (2) The default data source. This is currently provided by xwiki-platform-livetable. Many applications have their own data sources though. You don't need this to use the live table widget. For the delete space UI issue you can use the "url" parameter server the live table JSON from a template, so you don't need xwiki-platform-livetable. The only question for me is whether the default data source should be moved to a template or not. I don't think we need to move it. Thanks, Marius On Tue, Oct 14, 2014 at 10:52 PM, Eduard Moraru <[email protected]> wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2] https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik... _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Marius, thanks for the explanation, but I had no confusion there. Maybe I did not explain myself clear enough. The question (originally asked by Vincent) from the OP is "Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?" Do we want to have that as a common practice inside templates when listing documents or not? If we do want it to be used inside templates, does it make sense to ask each template to implement its own data source (like you are proposing now for the delete space UI example) or should we allow the templates to use the default data source (by making it a template as well)? Thanks, Eduard On Wed, Oct 15, 2014 at 11:42 AM, Marius Dumitru Florea < [email protected]> wrote:
Edy, you're mixing two things:
(1) The live table widget. This is currently provided by xwiki-platform-web. The widget has some HTML template (currently in macros.vm), some JavaScript code (livetable.js) and some CSS (livetable.css). The widget is configurable. The main configuration option is the data source. As written on
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParame... you can specify the data source either using the 'resultPage' or the 'url' parameter. What's important is that it can use **any** data source.
(2) The default data source. This is currently provided by xwiki-platform-livetable. Many applications have their own data sources though. You don't need this to use the live table widget.
For the delete space UI issue you can use the "url" parameter server the live table JSON from a template, so you don't need xwiki-platform-livetable.
The only question for me is whether the default data source should be moved to a template or not. I don't think we need to move it.
Thanks, Marius
On Tue, Oct 14, 2014 at 10:52 PM, Eduard Moraru <[email protected]> wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik...
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Wed, Oct 15, 2014 at 1:45 PM, Eduard Moraru <[email protected]> wrote:
Marius, thanks for the explanation, but I had no confusion there. Maybe I did not explain myself clear enough.
The question (originally asked by Vincent) from the OP is
"Can/should we use the livetable inside templates?
The live table widget can be used anywhere. I don't see why you wouldn't use it in Velocity templates. Any widget from xwiki-platform-web can and should be used in Velocity templates if needed.
Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?"
The live table widget is part of xwiki-platoform-web. What we have in xwiki-platform-livetable-ui is just a helper to ease the creation of a live table data source but it not required to use the live table. Moreover, the main use case that xwiki-platform-livetable-ui tries to cover is when you have an XClass. Most of the code from XWiki.LiveTableResultsMacros handles the querying, sorting and filtering on XObject properties. If your live table displays only document fields (title, author, date) and no XObject properties then most of that code is unused.
Do we want to have that as a common practice inside templates when listing documents or not?
If we do want it to be used inside templates, does it make sense to ask each template to implement its own data source (like you are proposing now for the delete space UI example) or should we allow the templates to use the default data source (by making it a template as well)?
It's a bad practice to have a Velocity template that depends on an XClass. Thus we shouldn't have the need to list documents of a certain type (XClass) in a Velocity template. Thus most of the code from xwiki-platform-livetable-ui wouldn't be needed when the live table is used in a Velocity template. That's why I'm not so sure we need to move the code from xwiki-platform-livetable-ui to Velocity templates. We shouldn't write a new data source for each live table that lists (plain) documents in a Velocity template of course. I would probably start by writing the source for the list of document to delete from the space and then when a new use case appears I would see how that source can be reused.
Thanks, Eduard
On Wed, Oct 15, 2014 at 11:42 AM, Marius Dumitru Florea < [email protected]> wrote:
Edy, you're mixing two things:
(1) The live table widget. This is currently provided by xwiki-platform-web. The widget has some HTML template (currently in macros.vm), some JavaScript code (livetable.js) and some CSS (livetable.css). The widget is configurable. The main configuration option is the data source. As written on
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParame... you can specify the data source either using the 'resultPage' or the 'url' parameter. What's important is that it can use **any** data source.
(2) The default data source. This is currently provided by xwiki-platform-livetable. Many applications have their own data sources though. You don't need this to use the live table widget.
For the delete space UI issue you can use the "url" parameter server the live table JSON from a template, so you don't need xwiki-platform-livetable.
The only question for me is whether the default data source should be moved to a template or not. I don't think we need to move it.
Thanks, Marius
On Tue, Oct 14, 2014 at 10:52 PM, Eduard Moraru <[email protected]> wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik...
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Wed, Oct 15, 2014 at 3:45 PM, Marius Dumitru Florea < [email protected]> wrote:
On Wed, Oct 15, 2014 at 1:45 PM, Eduard Moraru <[email protected]> wrote:
Marius, thanks for the explanation, but I had no confusion there. Maybe I did not explain myself clear enough.
The question (originally asked by Vincent) from the OP is
"Can/should we use the livetable inside templates?
The live table widget can be used anywhere. I don't see why you wouldn't use it in Velocity templates. Any widget from xwiki-platform-web can and should be used in Velocity templates if needed.
Fine by me. Do others have a different opinion on this? Then a first thing we would need to do for the #livetable macro is to add a parameter that makes it stop adding the {{html}} and {{/html}} macro calls since in templates we don`t have XWiki syntax. It seems that the current assumption was that the #livetable macro would always be called from wiki syntax, and that is not true for templates. Side note: Now that I`ve mentioned, I also wonder what is stopping us from actually applying rendering for the templates as well so we can have access to wiki syntax, but that's another discussion. Thanks, Eduard
Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?"
The live table widget is part of xwiki-platoform-web. What we have in xwiki-platform-livetable-ui is just a helper to ease the creation of a live table data source but it not required to use the live table. Moreover, the main use case that xwiki-platform-livetable-ui tries to cover is when you have an XClass. Most of the code from XWiki.LiveTableResultsMacros handles the querying, sorting and filtering on XObject properties. If your live table displays only document fields (title, author, date) and no XObject properties then most of that code is unused.
Do we want to have that as a common practice inside templates when
listing
documents or not?
If we do want it to be used inside templates, does it make sense to ask each template to implement its own data source (like you are proposing now for the delete space UI example) or should we allow the templates to use the default data source (by making it a template as well)?
It's a bad practice to have a Velocity template that depends on an XClass. Thus we shouldn't have the need to list documents of a certain type (XClass) in a Velocity template. Thus most of the code from xwiki-platform-livetable-ui wouldn't be needed when the live table is used in a Velocity template. That's why I'm not so sure we need to move the code from xwiki-platform-livetable-ui to Velocity templates.
We shouldn't write a new data source for each live table that lists (plain) documents in a Velocity template of course. I would probably start by writing the source for the list of document to delete from the space and then when a new use case appears I would see how that source can be reused.
Thanks, Eduard
On Wed, Oct 15, 2014 at 11:42 AM, Marius Dumitru Florea < [email protected]> wrote:
Edy, you're mixing two things:
(1) The live table widget. This is currently provided by xwiki-platform-web. The widget has some HTML template (currently in macros.vm), some JavaScript code (livetable.js) and some CSS (livetable.css). The widget is configurable. The main configuration option is the data source. As written on
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParame...
you can specify the data source either using the 'resultPage' or the 'url' parameter. What's important is that it can use **any** data source.
(2) The default data source. This is currently provided by xwiki-platform-livetable. Many applications have their own data sources though. You don't need this to use the live table widget.
For the delete space UI issue you can use the "url" parameter server the live table JSON from a template, so you don't need xwiki-platform-livetable.
The only question for me is whether the default data source should be moved to a template or not. I don't think we need to move it.
Thanks, Marius
On Tue, Oct 14, 2014 at 10:52 PM, Eduard Moraru <[email protected]> wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik...
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
On Wed, Oct 15, 2014 at 6:08 PM, Eduard Moraru <[email protected]> wrote:
On Wed, Oct 15, 2014 at 3:45 PM, Marius Dumitru Florea < [email protected]> wrote:
On Wed, Oct 15, 2014 at 1:45 PM, Eduard Moraru <[email protected]> wrote:
Marius, thanks for the explanation, but I had no confusion there. Maybe I did not explain myself clear enough.
The question (originally asked by Vincent) from the OP is
"Can/should we use the livetable inside templates?
The live table widget can be used anywhere. I don't see why you wouldn't use it in Velocity templates. Any widget from xwiki-platform-web can and should be used in Velocity templates if needed.
Fine by me. Do others have a different opinion on this?
Then a first thing we would need to do for the #livetable macro is to add a parameter that makes it stop adding the {{html}} and {{/html}} macro calls since in templates we don`t have XWiki syntax. It seems that the current assumption was that the #livetable macro would always be called from wiki syntax, and that is not true for templates.
Side note: Now that I`ve mentioned, I also wonder what is stopping us from actually applying rendering for the templates as well so we can have access to wiki syntax, but that's another discussion.
Don't worry about that, it's coming ;)
Thanks, Eduard
Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?"
The live table widget is part of xwiki-platoform-web. What we have in xwiki-platform-livetable-ui is just a helper to ease the creation of a live table data source but it not required to use the live table. Moreover, the main use case that xwiki-platform-livetable-ui tries to cover is when you have an XClass. Most of the code from XWiki.LiveTableResultsMacros handles the querying, sorting and filtering on XObject properties. If your live table displays only document fields (title, author, date) and no XObject properties then most of that code is unused.
Do we want to have that as a common practice inside templates when
listing
documents or not?
If we do want it to be used inside templates, does it make sense to ask each template to implement its own data source (like you are proposing now for the delete space UI example) or should we allow the templates to use the default data source (by making it a template as well)?
It's a bad practice to have a Velocity template that depends on an XClass. Thus we shouldn't have the need to list documents of a certain type (XClass) in a Velocity template. Thus most of the code from xwiki-platform-livetable-ui wouldn't be needed when the live table is used in a Velocity template. That's why I'm not so sure we need to move the code from xwiki-platform-livetable-ui to Velocity templates.
We shouldn't write a new data source for each live table that lists (plain) documents in a Velocity template of course. I would probably start by writing the source for the list of document to delete from the space and then when a new use case appears I would see how that source can be reused.
Thanks, Eduard
On Wed, Oct 15, 2014 at 11:42 AM, Marius Dumitru Florea < [email protected]> wrote:
Edy, you're mixing two things:
(1) The live table widget. This is currently provided by xwiki-platform-web. The widget has some HTML template (currently in macros.vm), some JavaScript code (livetable.js) and some CSS (livetable.css). The widget is configurable. The main configuration option is the data source. As written on
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParame...
you can specify the data source either using the 'resultPage' or the 'url' parameter. What's important is that it can use **any** data source.
(2) The default data source. This is currently provided by xwiki-platform-livetable. Many applications have their own data sources though. You don't need this to use the live table widget.
For the delete space UI issue you can use the "url" parameter server the live table JSON from a template, so you don't need xwiki-platform-livetable.
The only question for me is whether the default data source should be moved to a template or not. I don't think we need to move it.
Thanks, Marius
On Tue, Oct 14, 2014 at 10:52 PM, Eduard Moraru <[email protected]> wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik...
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On Wed, Oct 15, 2014 at 12:45 PM, Eduard Moraru <[email protected]> wrote:
Marius, thanks for the explanation, but I had no confusion there. Maybe I did not explain myself clear enough.
The question (originally asked by Vincent) from the OP is "Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?"
Yes, we should be able to use it. Otherwise, as you said above, ". The rightsUI would need a change as well, since it can no longer rely on the livetable" . So how would this happen from a practical point of view? We'd have another sort of table in the platform-web default ressources which can be used by the vms, which is nice and fancy and shiny but it's _not_ the livetable? And then the livetable would continue to be a nice and shiny table but a different one, installed as an extension? What would be the point of that? Or we'd make the rights UI ugly because we won't make another shiny table? It doesn't make sense. We need a nice table to implement default features, let the livetable be it (and have only one), even if it means changing the livetable from an extension to a standard web feature. Thanks, Anca
Do we want to have that as a common practice inside templates when listing documents or not?
If we do want it to be used inside templates, does it make sense to ask each template to implement its own data source (like you are proposing now for the delete space UI example) or should we allow the templates to use the default data source (by making it a template as well)?
Thanks, Eduard
On Wed, Oct 15, 2014 at 11:42 AM, Marius Dumitru Florea < [email protected]> wrote:
Edy, you're mixing two things:
(1) The live table widget. This is currently provided by xwiki-platform-web. The widget has some HTML template (currently in macros.vm), some JavaScript code (livetable.js) and some CSS (livetable.css). The widget is configurable. The main configuration option is the data source. As written on
http://extensions.xwiki.org/xwiki/bin/view/Extension/Livetable+Macro#HParame...
you can specify the data source either using the 'resultPage' or the 'url' parameter. What's important is that it can use **any** data source.
(2) The default data source. This is currently provided by xwiki-platform-livetable. Many applications have their own data sources though. You don't need this to use the live table widget.
For the delete space UI issue you can use the "url" parameter server the live table JSON from a template, so you don't need xwiki-platform-livetable.
The only question for me is whether the default data source should be moved to a template or not. I don't think we need to move it.
Thanks, Marius
On Tue, Oct 14, 2014 at 10:52 PM, Eduard Moraru <[email protected]> wrote:
Hi devs,
While looking into the delete space UI issue [1], we first thought about directly using the livetable macro to list the documents to be deleted from the space.
Now the problem, as state by Vincent: Can/should we use the livetable inside templates? Is the livetable part of xwiki-platform-web or is a removable extension (xwiki-platform-livetable)?
Currently, xwiki-platform-livetable only contains the 2 pages that generate the JSON for the livetable, but the html markup is generated by the #livetable macro (macros.vm) and the livetable.css and livetable.js files are all in xwiki-platform-web.
The only case of it being used in templates right now is in rightsUI.vm [2] where the macro is not directly called, but the html markup is created by hand and the javascript and css is included.
IMO, we should decide on a single approach for the livetable and use it all the way. What we do currently can be confusing even for us.
I currently see two directions:
1) Move the content of xwiki-platform-livetable in a xwiki-platform-web as templates so that the livetable is a core feature and that it also works in the UI when the database is empty.
2) Move the livetable macro (as wiki macro?), js (as JSX) and css (as SSX) from xwiki-platform-web to xwiki-platform-livetable and see the livetable as just another extension/feature that is only present when installed. The rightsUI would need a change as well, since it can no longer rely on the livetable and probbaly we would also need to find a way to allow extenions to contribute filesystem resources.
I thought it would be a good idea to open a discussion on this topic since it's currently, AFAIK, a grey area.
WDYT?
Thanks, Eduard
---------- [1] http://jira.xwiki.org/browse/XWIKI-8320 [2]
https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwik...
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
participants (6)
-
Anca Luca -
Clemens Klein-Robbenhaar -
Eduard Moraru -
Jean SIMARD -
Marius Dumitru Florea -
Thomas Mortagne