[00:35:41] Hello, I want to use #switch use either return nothing or a table row. How can I do that? Example: https://dpaste.org/E0mGp/raw [00:36:26] When value = no, I want nothing, but when value=yes, I want the table row. [00:48:58] don't use wikitext in parser functions, use HTML [00:49:16] if you absolutely must used wikitext for any reason, you can use {{!}} to mean `|` [00:49:30] but it gets ugly fast [01:16:17] Thanks Izno. [01:19:51] Just tried. Worked perfectly. Thanks a ton. [03:09:23] Hey! I was wondering how to put in a request for an edit to an auto-generated MediaWiki API documentation page? [03:14:13] Emitewiki2, that's generated from information and comments in the code. If you want to change it yourself, https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker . Otherwise, https://phabricator.wikimedia.org/ [03:22:17] Okay, awesome, I wondered as much! So I'll have to fork the code and then find a way to get permission to merge the update. [03:25:47] if the change is more or less trivial, gerrit does have a web UI [03:26:06] Oh, for real? [03:26:33] I need to find that. I'm used to GitHub-hosted projects, so this will be my first time using Gerrit. [03:26:35] https://www.mediawiki.org/wiki/Gerrit/Web_tutorial [03:27:09] https://www.mediawiki.org/wiki/Gerrit/Tutorial is the non-web UI version of that page [03:27:35] Thanks! Reading through that first link now. [03:32:17] So the login page I am finding for Gerrit at https://gerrit.wikimedia.org/r/login/ doesn't seem to have a "Sign Up" button anywhere that I can find. Yet my Mediawiki credentials don't work, either. [03:32:37] How does one sign in or sign up? [03:33:37] Nevermind, I think I finally found it here. Apologies for the bother, ignore those previous two messages. [03:33:37] https://wikitech.wikimedia.org/w/index.php?title=Special:CreateAccount&returnto=Gerrit/NewUser [03:45:03] Emitewiki2: not a bother, feel free to keep asking :) [03:45:52] Thanks, I appreciate it:) [03:45:53] I found the specific file I want to propose changes to. Currently trying to fork it via the Gerrit web interface. [03:50:07] the web interface is an inline editor [03:50:15] you basically hit 'edit' and go [03:52:18] Oh you're right. When it was having me select the brach I wanted and enter the topic and description, etc., I assumed it was going to create a fork that for me that I would have to merge. [04:12:45] I'm trying to write a good subject line for my commit message (I'd hate for my commit to be ignored just because I didn't write a proper subject line), but there is one item in the recommended guidelines that is confusing me. [04:13:01] I found the recommended guidelines here: https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines [04:13:29] that's the right place [04:14:17] what's the confusion? [04:15:18] All of the good examples include some word at the beginning with a colon, and then a message. In the structure "[some-word]:a more understandable subject" For example, things like "badger: Add accessibility labels to form fields", "rdbms: Avoid infinite loop on null input", or "jquery.badge: Add ability to display the number zero". [04:15:47] I have no idea what to put in the [some-word] that goes before the colon in a good commit message. I can't find where on the page it describes what that is. [04:15:54] API: Improve documentation for XX [04:16:13] Optionally, prefix the subject with the relevant component. A component is the general area that your commit will change. [04:16:29] the last line of "Subject" [04:16:40] usually the folder name is the component, in this case I assume you're editing something in includes/api, so "API" is the component [04:16:41] Oh shoot, there it is. [04:16:55] it probably shouldn't be the last line. :) [04:17:14] Haha yeah that might help the eyes to skim over it less when it's talking about a prefix :P [04:17:16] since it's the first thing you plan to write [04:17:22] more documentation for you to update ;-) [04:17:56] Perfect, that is very helpful legoktm . Thanks for that tip for my case! [04:35:07] taavi Nikerabbit that namespace stuff is hella confusing [04:36:27] It talks about disabling a bunch of stuff [04:36:46] But I'm not sure what to add to localsettings to simply allow users to create/edit discussion pages but not create/edit main pages [04:44:35] Alright, I just published my first edit to the mediawiki core files (an API documentation change) and "marked as active" thanks to you Izno & legoktm ! [04:44:51] Thank you all so much for the help! [04:44:53] Emitewiki2: link? [04:44:58] https://gerrit.wikimedia.org/r/c/mediawiki/core/+/881864 [04:45:16] How does everything look? [04:46:48] I can't actually see any files being modified? [04:46:58] I can [04:47:06] it's includes/api/i18n/en.json [04:47:24] Sorry I was impatient, it was still loading [04:47:28] :) [04:48:40] Emitewiki2: unfortunately the "api-help-param-continue" message is reused in other modules too, so it shouldn't specifically reference cmlimit [04:49:00] Oh, is that true? [04:49:33] maybe it can be written generally? "When more results than the amount requested are available..." [04:49:55] Also I don't think continue is always a page [04:50:00] it could e.g. be a log entry [04:51:10] Ah.  Is it possible to reference the "categorymembers" continue parameter specifically? [04:51:59] Like, to make a change that will only appear in that module? Similar to the "apihelp-query+categorymembers-param-start" on line 739? [04:52:50] then we'd have to have make a separate copy for every API module that has a continue parameter [04:53:08] Ah, I see. [04:53:49] How many modules use it? [04:54:15] there's also no need for the xxlimit parameter to even be used in the first place, you could be using the default limit, or you could've put a much higher limit than you're allowed and the API returned less results [04:55:58] Because the description in its live version to me feels too general and frankly unhelpful for anyone trying to learn what the parameter does. And there aren't really spots in the documentation that explain it in more detail that I find. [04:55:59] I'd be willing to change each of the modules that use it to make the description helpful for each of their use cases. [04:57:47] Fair point legoktm, I just included that to be more specific. I thought it would be better to be more explicit and explanatory rather than under-explicit since this documentation is supposed to teach people what the parameters do. [04:57:52] personally I think expanding the wiki documentation at https://www.mediawiki.org/wiki/API:Query#Example_4:_Continuing_queries to be its own section or page rather than 1 buried example would be best, and then linking to that [04:58:16] the autogenerated API docs have to be somewhat succinct because of space, but wiki pages can be as detailed and go into specific examples as we want [05:00:48] Your suggestion seems like a good idea! I'd be willing to edit the commit to link to the example instead. [05:03:10] I created https://www.mediawiki.org/wiki/API:Continue as a redirect to that section [05:03:26] if you link [[mw:API:Continue]] then if/when it gets expanded into a separate page we don't need to update the message [05:03:35] (also the link anchor seems a bit fragile) [05:05:50] What do you think a good way is to indicate to the reader that XXcontinue is a general parameter and not a specific parameter to categorymembers? [05:05:50] For example, I don't think I realized until now that it was a shared parameter among other queries. (Is "queries" the right term, here?) So when I look at https://www.mediawiki.org/wiki/API:Query#Example_4:_Continuing_queries my eyes immediately glaze over the "accontinue" piece because I think I am only looking for "cmcontinue". [05:09:51] these are generally considered query strings, yes [05:10:00] I think that's even what they're called in IETF land [05:10:37] well you're supposed to pass back everything in the "continue" block [05:10:54] really you shouldn't care what the parameter is named, just pass it back blindly [05:12:29] https://www.mediawiki.org/w/index.php?title=API:Query&oldid=3314960#Continuing_queries [05:12:52] that documentation was much better [05:12:59] Makes sense now that I know more about what it is. I don't think that was clear to me when I was first trying to learn how to utilize it, because the documentation just said "use this to continue". [05:13:53] Oh, that old revision was so much better. Why did that get truncated so badly, just because it used an outdated code example? [05:15:08] someone thought it was unnecessary [05:15:16] the downside of wikis that anyone can edit :p [05:15:54] liek if u cri everytim [05:16:12] Well anyway. I would be happy to convert that into its own page, as you suggested. [05:16:47] Seems much less likely that someone will go out of their way to delete an entire page than they would to trim down a more general page they thought was getting too long. [05:18:20] I restored the section: https://www.mediawiki.org/wiki/API:Query#Continuing_queries [05:18:50] feel free to move it to a separate page [05:19:49] Emitewiki2: do you want to amend your patch to say something like "Detailed information on how to continue queries is [[mw:whatever|available on mediawiki.org]]"? [05:21:20] Sure! Let me do that and then I'll begin converting your current-redirect page. [05:24:50] :D awesome [05:29:33] How does this sound before I commit? [05:29:34] "When more results are available, use this to continue. More detailed information on how to continue queries [[mw:API:Continue|can be found here]]." [05:32:53] Also, am I wanting to be including "Special:MyLanguage/" in my link to the mediawiki.org page? I can't tell if this is something that helps with compatibility for all pages or if that wouldn't apply to this link I'm adding. [05:36:29] Emitewiki2: instead of "here", say "mediawiki.org". You're not supposed to use stuff like "click here" for...reasons I don't remember. And yes, please use Special:MyLanguage/! [05:40:22] legoktm, it's confusing for people who don't see so gud [05:41:06] though I've seen one or two articles from accessibility experts who say that it's so bad it's good, because the pattern is now understood by blind people [05:41:19] great, thanks bad web practices o7 [05:41:30] brilliant [05:44:28] Alright, sounds good. I only wondered if it would be confusing for readers since they are probably reading it on mediawiki.org already. [05:44:29] How does this sound? [05:44:29] "When more results are available, use this to continue. More detailed information on how to continue queries [[mw:Special:MyLanguage/API:Continue|can be found on mediawiki.org]]." [05:45:35] lgtm! [05:48:12] Published! [05:48:12] https://gerrit.wikimedia.org/r/c/mediawiki/core/+/881864/3 [05:48:35] I don't know how to change my commit description, which is slightly inaccurate now. [05:48:55] you edit it like it's a file :) [05:49:47] also under the commit message there's a dedicated "edit" button [05:52:09] Oh lol I found it. It must not appear when the entire commit is in "Edit" mode. [05:53:10] Okay, I think think the entire commit is finished now (y)  Does it seem like it could one day have a shot at being mergable? [05:54:23] I expanded your commit message a bit [05:55:26] "one day" :) [05:56:14] it'll hopefully take CI like 15 min to merge it [05:58:12] Oh, wow, that's great! [05:58:20] I didn't know how quickly things worked around here. [05:58:25] Who are "CI"? [05:58:31] you gave legoktm an easy thing to change [05:58:45] https://www.mediawiki.org/wiki/Continuous_integration [05:58:58] https://en.wikipedia.org/wiki/Continuous_integration also [05:59:16] you can see your patch in the "gate-and-submit" queue on https://integration.wikimedia.org/zuul/ [05:59:37] you managed to nerd snipe me with API docs + continuation [05:59:46] :) [05:59:48] properly implementing continuation in API clients is really a pain [06:00:56] I agree, it's why I was distressed that the API documentation was so lacking in anything helpful originally lol [06:01:28] I found, like, one StackOverflow post out there that sort of pointed me in the right direction and the rest was just me figuring out how to use it through experimentation. [06:01:52] The Internet has a surprising lack of examples helping teach how to use it. [06:03:55] more help on API docs is always welcome :> [06:04:19] Maybe I'll try and find more places where I can contribute, in that case! [06:06:01] https://phabricator.wikimedia.org/maniphest/query/eaOd20aHZNwI/#R [06:06:03] Well I have to log off now, unfortunately. I will have to try and update the [[mw:API:Continue]] page tomorrow or the next day. (Minimum 16 hours from now.) [06:06:03] Thank you so, so, much for your help in teaching me how to make my first codebase commit Izno and legoktm!! I *hugely* appreciate how patient, helpful, and friendly you were! [06:06:10] Makes all the difference in the world! [06:06:16] :))) happy to help [06:06:21] hope to see you again! [06:06:38] Have a fantastic rest of your [night/day/whatever it is where you are]! [07:29:34] \o/ [09:28:04] Why does the block api not support setting the bot flag? [14:25:42] one $10,000 + two $5,000 awards available to open source developers https://www.nten.org/change/pizzigati-prize (no affiliation, just FYI) [14:31:18] In the software world, 10 grand isn't exactly a huge amount of money [14:44:14] "In the software world, 10..." <- Oh, I agree, but at least it's something. Scale in the financial realm is often frustrating and mind-boggling. Billionaires / corps routinely pay hundreds of millions in fines for breaking the rules when it means that they can make billions by doing so. Individuals fight for scraps. [18:31:02] RhinosF1: log entries can't be marked as bot, there's a longstanding issue about this [18:31:27] oh [18:31:31] link? [18:32:05] https://phabricator.wikimedia.org/T18816