10:20:04 AM phuedx: got time to talk about https://gerrit.wikimedia.org/r/#/c/252210/? 10:20:17 AM alright thanks :) 10:21:06 AM bmansurov: yes, absolutely 10:21:21 AM ok, cool 10:21:50 AM So as I understand it we cannot take the same approach as Jon and create a muhogan complier in the cards extension, can we? 10:22:04 AM that would conflict with the existing implementation 10:23:03 AM we could create hostache maybe? 10:23:30 AM but in the long run we should create a patch in core that does it automatically 10:24:10 AM bmansurov: we could dynamically create the module in the ResourceLoaderRegisterModules hook 10:24:11 AM right now since we don't have time to do so we should go with a less perfect solution 10:24:22 AM no custom rl module 10:24:37 AM which we have no way of sharing 10:24:47 AM well, we do, but we didn't think about it at the time 10:25:13 AM 10:23:30 AM but in the long run we should create a patch in core that does it automatically -- alternatively, stop using hogan in mobilefrontend 10:25:46 AM phuedx: ok 10:26:07 AM afaik hogan is used becuase it weighs less than mustache 10:26:16 AM also, how would we handle this? https://github.com/wikimedia/mediawiki-extensions-QuickSurveys/blob/master/resources/mediawiki.template.muhogan/init.js#L14 10:26:35 AM how do you mean? 10:26:43 AM do you mean getting the compiler? 10:26:57 AM mw.template.registerCompiler( 'muhogan', compiler ); would fail if we also registered our own muhogan no? 10:27:03 AM yes 10:27:09 AM or are you suggesting we should not register a new complier? 10:27:21 AM i'm suggesting that we don't register a new compiler 10:27:30 AM ok 10:27:56 AM if i'm not mistaken templates will work only if the file extensions match 10:28:05 AM for example hogan compiles *.hogan files only 10:28:18 AM just looking through mw.template now 10:28:20 AM ok 10:30:18 AM also, mustache.min.js weighs in at 3.2 kb... 10:30:29 AM i shall write a task to start a discussion 10:30:33 AM cool 10:31:41 AM bmansurov: namespace the resourceloader module class 10:31:57 AM and mostly copypasta its definition 10:32:16 AM provided that the quicksurveys one is in the QuickSurveys namespace 10:32:24 AM and yours is in the RelatedArticles namespace 10:32:28 AM you won't get collision 10:32:28 AM *s 10:32:40 AM will /will/ create a library later asap 10:33:16 AM phuedx: you're talking about namespacing https://github.com/wikimedia/mediawiki-extensions-QuickSurveys/blob/master/includes/ResourceLoaderMuhoganModule.php right? 10:33:19 AM but yeah, you're right, the behaviour of mw.template.get around fetching compilers from template names makes this tricky 10:33:26 AM yup 10:33:28 AM yay 10:33:32 AM it's namespaced 10:33:46 AM what about the front end part of it (the link above) 10:33:49 AM ? 10:33:51 AM so if you had a similar implementation in relatedarticles, but in the relatedarticles extension, then it won't collide 10:34:07 AM ok 10:34:28 AM sec 10:35:18 AM bmansurov: mw.template.registerCompiler does a little validation but overwrites the currently registered compiler if it's set 10:35:50 AM cool then, let's overwrite it ;) 10:35:52 AM so, you could either be nice and test if the compiler's registered (with a comment alongside explaining that this should be gotten rid of by sharing code) 10:35:54 AM or… 10:35:55 AM that :) 10:36:12 AM alrighty, let me see if i can implement it 10:36:41 AM cool 10:36:51 AM i'll be around longer today as i've got to make up some time 10:37:19 AM great