[00:02:01] There's $wgMFDefaultEditor [00:02:10] >Default editor when there is no user preference set (mobile-editor). One of 'source', 'visual', or 'preference' (inherit desktop editor preference). [00:02:21] "DefaultUserOptions": { [00:02:21] "mobile-editor": "" [00:02:21] }, [00:08:04] That just switches between VE and source editor [00:08:04] But both are in the MF editor app thing [09:04:43] I have pushed a commit on gerrit and then do some edit in the file in the browser itself using that edit option that gerrit provide ? [09:04:44] How to pull this to my local repo ?? [09:09:12] I use git review -d 123456 (with your patch number) [09:17:34] Nikhil61: there's a quick guide here if you want to bookmark it: https://www.mediawiki.org/wiki/Git/TLDR [09:18:04] okk thanks [09:31:56] One commit can have multiple patchset [09:31:57] is It correct? [09:48:38] one patch can have multiple versions (hence, a patchset), each version is stored as a separate commit [09:52:08] not getting it [09:52:08] do you mean one patch have multiple version (commits) and each version can have multiple patchset [09:56:39] maybe https://gerrit-review.googlesource.com/Documentation/concept-changes.html can help with the confusing terminology [09:59:11] okk thanks a lot [09:59:11] my doubt get solved in first few lines of link you provided [15:33:02] like this one: https://pasteboard.co/XZomfNIa6JS1.png TheDJ1626[m], after saved a new page it appears on the top right corner [15:39:46] You can probably hide the class postedit with css [15:40:20] It is generated by resources/src/mediawiki.action/mediawiki.action.view.postEdit.js [15:48:16] How can you add an icon/image next to a link in the mobile sidebar? I can't find anything on it here: https://www.mediawiki.org/wiki/Manual:Interface/Sidebar [16:06:50] Hi, I have a question: Is it possible to run any kind of script once a Wikipage is edited? [16:09:23] Guest85: In principle yes, although normally people don't run scripts during during the edit page workflow [16:11:12] Can you tell me how? I need it to set an "is_edited" flag in my database [16:13:14] !hook RevisionRecordInserted | Guest85 [16:13:14] Guest85: https://www.mediawiki.org/wiki/Manual:Hooks/RevisionRecordInserted [16:13:28] I don't know if that is neccessarily the best way, but it is a way [16:13:43] I thought there was a ArticleSaveComplete or somesuch [16:13:56] That sounds like a better one :) [16:14:00] oh, it was removed in 1.29 [16:14:12] https://www.mediawiki.org/wiki/Manual:Hooks/PageSaveComplete is the new hotness [16:14:18] Its so much harder to grep for hooks these days [16:14:58] if I have access to the codebase, I don't grep, I just ls the hook interface directory [16:15:07] yeah, that sounds like a much better hook [16:15:10] Thank you very much, I will look into this:) [16:15:16] moonmoon: But there are multiple hook directories! [16:15:29] I suppose I could use find [16:15:50] I also miss how easy it used to be to grep for things like $wgOut and what not, when they were all named consistently [16:16:16] I hate to say "the solution is to get an IDE" but... it makes those sorts of things much easier [16:23:25] I imagine someone has made a standalone tool that is basically grep but if grep understood program semantics [16:23:30] Maybe that is what semgrep is [17:10:39] Will give it a try, thank you! TheDJ1626[m] [19:12:02] I missed that `mw.notify` now lazy-loads `mediawiki.notification`, that's actually really useful [19:13:34] [Just to spam my own thing]: I created a review board where you can ask people to review your patches you can't get reviews for https://www.mediawiki.org/wiki/Code_review/patch_board [19:13:47] I'd love if people have feedback on the idea, or want to try it out [19:15:40] :o [19:16:21] bawolff: I appreciate the sentiment with the rules to make it usable, but uh, it's a wall of text [19:16:45] hmm, umm yes [19:16:48] lol [19:17:29] legoktm: That's why i added the cat picture, to break it up! [19:17:50] also, and more importantly, you spelled "Gerrit" correctly in your meme, which really ruins it [19:18:10] Also, I wrote I AM instead of IM [19:18:20] {{delete}} [19:18:41] can I edit the rules to make it less dense? [19:18:53] And if i was doing it again, i'd maybe use white for the text. The - on -1 kind of disappears [19:18:56] legoktm: yes go ahead [19:19:19] I think the only really important rule is one patch at a time so it doesn't turn into every unreviewed patch ever [19:20:30] I also expect, that if this actually gets used, the rules will evolve over time [19:22:24] > Once someone reviews your patch (Either +2's or -1's it) it goes off the list [19:22:33] I think it would be nice to keep in-progress reviews on the list [19:22:53] Hmm. Maybe in a different section or something [19:23:07] or just annotate that it's under review by X [19:23:35] like, the goal is +2 or -2/abandon, if a -1 drops you back to the end of the line, that kind of sucks [19:24:26] I'd want things to drop off eventually. Like if someone gave a review, and then the original author doesn't fix any of the issues for 6 months [19:24:38] I feel like a list of patches you want reviewed is something Gerrit already provides 🤔 [19:25:06] Izno[m]: but actually finding anything meaningful out of the gerrit list is pretty hard [19:25:19] or at least i find it hard [19:25:26] I know, it's half a joke, but also not. [19:25:53] https://www.mediawiki.org/w/index.php?diff=5750561&oldid=5750555&title=Code_review%2Fpatch_board [19:27:35] would be nice to get it down to 4 bullets [19:27:42] legoktm: looks good [19:28:50] Also, it would be nice if we archived these rather than banishing to history just so it's easier to evaluate how successful or not this is [19:29:11] That's a good idea [19:32:33] We could maybe remove the aimed at volunteers bullet. I don't think its that likely wmf staff are going to abuse the process, and if it somehow becomes a problem we can address that when and if it does [19:33:54] legoktm: What do you think about, if the patch gets reviewed, it goes off the list, but after they fix the issues they are allowed to re-add it the spot where it was previously? [19:38:05] I do think though that the goal is not neccessarily +2 or abandon, but to get things out of limbo. We want at the end of the process there to be a clear action item for what the person should do next [19:38:43] So like, -1 fix some things, is still a win, even if it is not over the finish line [19:43:04] bawolff: I would move the volunteer part to the intro [19:43:24] "Often people complain that their patches" -> "Often volunteer developers complain that their patches" [19:43:43] lol, tbf, WMF staff whine all the time ;) [19:43:51] I think ideally the person who signs up to review it sticks with it till the end [19:44:02] you're likely to have a much better time with CR if you have consistent reviewers [19:44:16] rather than getting 3 different people who all have diff standards and ideas on how it could/should be structured [19:44:22] definitely the ideal [19:45:29] I like your idea of having an in progress section, and then if it gets stuck again, you get your old place in line back [19:46:09] I am also curious from a reviewer perspective, if patches will be consistently picked up in order or people will go for the patches that look easier or interesting [19:46:22] because I tend to do the latter [19:46:26] Couldn't this be a work board in the Patches for Review tag in Phab? [19:47:08] I'm kind of hoping that people go through the list in order from top to bottom, to prevent resource starvation of unpopular patches [19:53:06] I wouldn't be surprised if no one actually cares for that project in phab [19:54:09] s/I wouldn't be surprised if// [19:54:27] 22 watches, 1 username i somewhat recognise [19:54:35] Yes, hence my thinking about it. 🙂 [19:55:10] It's marginally more discoverable for the group of people uploading patches I think, and might give it some purpose. [19:55:11] Also, phabricator is kind of where processes go to die [19:55:14] just saying [19:55:36] At least in my experience, people always forget about on-phabricator processes [19:56:15] the bureaucracy is a fucking mess, and that's me being very nice and polite about it :D [20:12:13] maybe it's helpful to add an extra field in the "Patches" section for providing additional context to potential reviewers [20:13:07] Hmm. I would kind of hope though that helpful context would be on gerrit itself, for reviewers not getting to the patch from this page [20:13:15] kostajh: what type of context did you have in mind? [20:15:48] I wonder if the 1 week no activity rule is really needed. Would it really be that bad if people posted patches immediately. The 1 patch per person should stop it from being overly-spammed [20:19:05] Hi all, when I edit a page on Mediawiki, there is a default checkmark set "watch page" - how can I configure my account to not have this preselected? I hardly want to watch every page I edit.. [20:19:24] Leris: it should be in Special:Preferences [20:20:42] Leris: If you click on my preferences (usually in the top right depending on your skin), then go to watchlist tab, then near the bottom there is a "watched pages" section, that controls this [20:21:37] bawolff: Thanks a lot! I did not find the watchlist tab before. Now it all makes sense :) [20:21:59] I actually had to try it myself, and the first time i did I couldn't figure out where the button was :) [21:09:43] Also, phabricator is kind of where processes go to die is it possible to create a template, say called TemplateUsage, that would work like: `{{TemplateUsage| {{MyTemplate|blah}} }}` -- turns into --> `Usage: {{MyTemplate|blah}} Result: {{MyTemplate|blah}}` [21:51:22] because I keep repeating the latter in in my template pages to document their use with examples [21:52:22] what would be needed to write such a template, I think, is a way to generate a use of but only after one level of template evaluation... [21:52:24] taylan: I think on english wikipedia there is a template named {{tl}} that does something like that [21:52:35] but uses the form {{tl|my template}} [21:53:22] having the parameter be like {{TemplateUsage| {{MyTemplate|blah}} }} seems impossible [21:53:28] with the embedded {{ [21:54:29] I thought templates are "pass by name" or "lazy evaluated", in computer science terms, so I thought it might be possible somehow [21:54:36] indeed is impossible, templates are not lazy evaluated [21:54:42] oh ok [21:54:50] Although i recall hexmode was making a lua extension to do it [21:54:52] (parser functions are) [21:55:24] There's no exposed method to do it, but internally there is an "unparse" method to reverse the evaluation. But its not exposed to wikitext [21:56:25] whenever I write templates, I keep wishing for full programming language features, including assigning variables and whatnot :D [21:56:38] !e Scribunto | taylan [21:56:39] taylan: https://www.mediawiki.org/wiki/Extension:Scribunto_ [21:57:33] Some people also invented something called Extension:Variables but scribunto is much better [21:58:27] or I suppose more accurately, parser functions can opt into being lazily evaluated (Extension:ParserFunctions does this, for example, so #if and the like don't evaluate the branch not taken) [21:59:20] I've held off from installing the Lua extension until now because I fear it will open a whole can of worms in terms of maintenance, but maybe I should just do it... [22:00:08] taylan: Its not hard for maintenance. It comes with the lua binaries included, so it works out of the box [22:01:07] I should clarify, when i say unparse, I mean for parser functions that have opted into lazy evaluation. [22:03:10] hmm, I'll also have to learn Lua and the specific way it's used in Scribunto... I might install this eventually, but let's see if I can do without for now. [22:03:43] Its a pretty easy language to learn fwiw [22:04:28] And wikitext templates are really terrible after you get to a certain level of complexity [22:05:51] There you go, can thank me later: https://learnxinyminutes.com/docs/lua/ [22:39:34] https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual is also useful [22:55:57] Not exactly equivalent, but you can use `Template:((` to do something like this:... (full message at ) [22:56:56] Obviously this only works for one parameter calls (like{{Template|P1}}), if you want more you need to make it longer or use Arrays or Scribunto [22:57:16] s/// [23:07:12] Oh and you also can't have optional parameters here, but I'm quite sure it's possible, just even more annoying to write [23:57:28] Would Scribunto allow me to add data to pages, which I then use for auto-generating content on other pages? Example: Say I have pages Cat and Dog which belong to Category:Animals. On Cat I put something like {{#data: size = small }} and on Dog I put {{#data: size = medium }}. [23:57:29] Then I have a page called Animals which contains a table of pages in Category:Animal and a column listing their size. Is such a thing possible?