Kaldari, RobLa, Trevor and I met yesterday to discuss the template RFC [1].
Sadly Gabriel was not present. Kaldari and I are very concerned that we are blocking standardisation of a generic template library on the completion of Knockoff.
Trevor, Kaldari and I identified that two things need to happen for the templating solution that currently lives in Mantle [2] to core:
1) We need some JavaScript API for using templates (in current form all we have is a standard way to ship templates from the server to the frontend). Trevor is working on a template widget for oojs which will make this possible 2) We need a standard template language 3) Better namespacing for templates - we identified that we will need to find better ways of uniquely identifying templates [3].
We questioned whether point 2 should be blocking, as we recognised that even if we decide to standardise on Knockoff in future, it should be trivial to write a script that converts Hogan/Handlebars template language to Knockoff. The Mantle ResourceLoader module in current form is template agnostic and currently works with both Hogan and Handlebars, so in theory should make it easy to transition from one template language to another.
On this basis, I think the next step would be for the oojs development team to get a template widget up that can be used by Mantle.
[1] https://www.mediawiki.org/wiki/Requests_for_comment/HTML_templating_library [2] https://www.mediawiki.org/wiki/Extension:Mantle [3] https://bugzilla.wikimedia.org/show_bug.cgi?id=69916
On Fri, Aug 22, 2014 at 11:34 AM, Jon Robson jdlrobson@gmail.com wrote:
- We need some JavaScript API for using templates (in current form
all we have is a standard way to ship templates from the server to the frontend).
Well, Mantle does have a basic template.add(), get(), and render() API. It seems OK.
Before we know the API is right I would like to see proof-of-concept template compilation. Handlebars templates can/could be compiled in advance at commit-time, during a build process, on the server at request time, or on the client. Developers should not have to change code for this. ( https://bugzilla.wikimedia.org/show_bug.cgi?id=64735 for handlebars.)
Trevor is working on a template widget for oojs which will make this possible
Great, though I don't understand what this is. Is this a specific widget that uses a specifc template, or an "platform" widget that handles templating for other OOUI widgets?
- We need a standard template language
- Better namespacing for templates - we identified that we will need
to find better ways of uniquely identifying templates [3].
We questioned whether point 2 should be blocking, as we recognised that even if we decide to standardise on Knockoff in future, it should be trivial to write a script that converts Hogan/Handlebars template language to Knockoff. The Mantle ResourceLoader module in current form is template agnostic and currently works with both Hogan and Handlebars, so in theory should make it easy to transition from one template language to another.
On this basis, I think the next step would be for the oojs development team to get a template widget up that can be used by Mantle.
Great, again I'm confused :)
FWIW the pressing need of several teams is a dialog component with the Agora appearance to replace homebrew and jQuery UI dialogs. As I understand it, besides VE of course Media Viewer has an OOUI dialog in its "Use this file" pop-up.
On Fri, Aug 22, 2014 at 12:14 PM, S Page spage@wikimedia.org wrote:
On Fri, Aug 22, 2014 at 11:34 AM, Jon Robson jdlrobson@gmail.com wrote:
Trevor is working on a template widget for oojs which will make this possible
Great, though I don't understand what this is. Is this a specific widget that uses a specifc template, or an "platform" widget that handles templating for other OOUI widgets?
It will be a generic container for template rendering.
// Create a templatevar thing = new OO.ui.TemplateWidget( 'some way of identifying the template' );// Render the template into thing.$element thing.render( { /* some data */ } );// Add the template to the body $( 'body' ).append( thing.$element );// Render it again with different data, retaining the same this.$element reference thing.render( { /* some different data */ } );
This will also allow you to extend TemplateWidget and add methods which either change the data and either trigger re-rendering or just surgically tweak the DOM as needed.
- Trevor
On Friday, August 22, 2014, Jon Robson jdlrobson@gmail.com wrote:
Kaldari, RobLa, Trevor and I met yesterday to discuss the template RFC [1].
Maybe you are luckier than me, but after reading this and other threads and https://www.mediawiki.org/wiki/Requests_for_comment/HTML_templating_library, I cannot get a picture of the blockers and dependencies this RfC depends on -- although it is clear that there are many.
Just in case it helps, I have created a task for this RfC at http://fab.wmflabs.org/T572. Please identify current blockers there (or here) in order to focus the contributions in the tasks that matter.
Just in case it helps, I have created a task for this RfC at http://fab.wmflabs.org/T572. Please identify current blockers there (or here) in order to focus the contributions in the tasks that matter.
Shouldn't this be on Bugzilla instead of Phabricator? This bug has nothing to do with Phabricator and I thought we were currently only using Phabricator for bugs related to Phabricator.
Thank you, Derric Atzrott
On Thursday, August 28, 2014, Derric Atzrott datzrott@alizeepathology.com wrote:
Just in case it helps, I have created a task for this RfC at http://fab.wmflabs.org/T572. Please identify current blockers there (or here) in order to focus the contributions in the tasks that matter.
Shouldn't this be on Bugzilla instead of Phabricator? This bug has nothing to do with Phabricator and I thought we were currently only using Phabricator for bugs related to Phabricator.
The architecture committee and the engineering community team agreed to use Phabricator in this fine-tuned RfC process. See https://lists.wikimedia.org/pipermail/wikitech-l/2014-August/078025.html for the related announcement.
"We need to agree on Requests for comment/HTML templating library" is not a bug strictly speaking. Hopefully in a month we will not need to discuss about Bugzilla vs Phabricator because we will all be using the latter.
The architecture committee and the engineering community team agreed to use Phabricator in this fine-tuned RfC process. See https://lists.wikimedia.org/pipermail/wikitech-l/2014-August/078025.html for the related announcement.
I remember that now. Thank you. I was a bit concerned because I could see people looking for it in Bugzilla and not finding it there.
"We need to agree on Requests for comment/HTML templating library" is not a bug strictly speaking.
Nor is a lot of what is in Bugzilla.
Hopefully in a month we will not need to discuss about Bugzilla vs Phabricator because we will all be using the latter.
Indeed! Very much looking forward to that! Phabricator looks like a great piece of software.
Thank you, Derric Atzrott
On 08/22/2014 11:34 AM, Jon Robson wrote:
Kaldari, RobLa, Trevor and I met yesterday to discuss the template RFC [1].
Sadly Gabriel was not present.
Sorry, you scheduled the meeting while I was on vacation.
Kaldari and I are very concerned that we are blocking standardisation of a generic template library on the completion of Knockoff.
I'm not aware of any remaining blockers, so I'd be curious what you would consider missing for completion. The only major feature asked for in the mobile evaluation [1] (container-less control flow syntax) has been supported since knockoff 0.1.3, released July 8th [2].
- We need a standard template language
We questioned whether point 2 should be blocking, as we recognised that even if we decide to standardise on Knockoff in future, it should be trivial to write a script that converts Hogan/Handlebars template language to Knockoff.
There will be bits like helpers and complex expressions that aren't trivial to convert automatically, and will require manual intervention.
We can make quick progress by making a decision and then making it happen. I'm sure we can figure out a way to do it without waiting around for another few months ;)
Gabriel
[1]: https://www.mediawiki.org/wiki/Requests_for_comment/HTML_templating_library/... [2]: https://github.com/gwicke/knockoff/commits/master
wikitech-l@lists.wikimedia.org