Wikipedia talk:WikiProject Articles for creation/Helper script/Rewrite/Archive 1
[0.3] Feedback about article review
{{resolved}}
Review this submission should not appear if(mw.config.get('wgPageContentModel') !== 'wikitext'). There is no reason for the script to appear on userjscss pages... — {{U|Technical 13}} (t • e • c) 02:15, 14 March 2014 (UTC)
Done, thanks :) Theopolisme (talk) 04:49, 14 March 2014 (UTC)
Parsing
{{resolved}}
If all you care about is template names and their parameters, you could have avoided using Parsoid and use rvgeneratexml
instead. See mw:User:Kephir/XML parse tree for the parse tree format. Keφr 06:22, 14 March 2014 (UTC)
- Thanks for the heads up, Keφr! I'm actually not just getting template names/parameters but also various other pieces of data about the page (more in the future). Yeah, I probably *could* use the API combined with some other query parameters but Parsoid is fast enough already for our needs (especially via parsoid-prod.wmflabs), plus the JSON is very simple to manipulate as well as grab new information from. Theopolisme (talk) 06:52, 14 March 2014 (UTC)
- Okay, then. I skimmed through the source code and Parsoid was mentioned only in one place, and seemingly only to extract that information. Quite a waste of bandwidth right now, as a Parsoid-parsed page contains human-readable data entangled with with machine-readable data (never mind more HTTP round trips). Not sure how the former might become useful later, but I guess you know what you are doing. Keφr 08:17, 14 March 2014 (UTC)
- Yeah, I'm definitely not completely sure about ditching the API of course. I'll being doing some more detailed speed comparisons and such in the future -- thanks for brining this to my attention. Theopolisme (talk) 17:25, 14 March 2014 (UTC)
- Okay, then. I skimmed through the source code and Parsoid was mentioned only in one place, and seemingly only to extract that information. Quite a waste of bandwidth right now, as a Parsoid-parsed page contains human-readable data entangled with with machine-readable data (never mind more HTTP round trips). Not sure how the former might become useful later, but I guess you know what you are doing. Keφr 08:17, 14 March 2014 (UTC)
Kephir Spent my afternoon doing some serious speed tests. It looks like even with the additional requests in the future (metadata, categories, etc.), using the api itself rather than Parsoid is still faster. So... I've implemented it! Your guide was extremely helpful, and the script is significantly sped up as a result. Just goes to show that shiny new features aren't always better. (The funny thing is, I was working on Special:ExpandTemplates in MediaWiki itself recently...implemented the HTML preview functionality... and still didn't remember that you could get the XML parse tree...*sigh*). Again, thank you. :) Theopolisme (talk) 01:25, 15 March 2014 (UTC)
More notes.
{{resolved}}
Accept button returns no action with "NS_ERROR_DOM_QUOTA_REACHED: Persistent storage maximum size reached" as an error message in the console. Decline and Comment do work, but visually need a bottom border as the letters are too hard to read with the bottom of them bleeding into the white space below. — {{U|Technical 13}} (t • e • c) 12:51, 14 March 2014 (UTC)
- This is due to your browser reaching its localStorage limit (we use localStorage to cache persistent data like the WikiProject list). I've added a try/catch block so the script will still continue if unable to cache the data (a message will be logged to the console for debugging purposes). Also reduced the font size of the header text which should help with readability issues. This will be on-wiki soon, keep the feedback coming :) Theopolisme (talk) 17:19, 14 March 2014 (UTC).
- Hrmm. Not sure why my system would be reaching the localStorage limit... Where do I find the default limit that my browser is set at... I'd like to try and find out how much of a difference there is. If there is a huge difference, maybe what is stored there should be trimmed? — {{U|Technical 13}} (t • e • c) 17:37, 14 March 2014 (UTC)
- Web storage#Storage_size might be useful. It's still not entirely clear though, and different browsers vary in how they handle storage. You can look at the
window.localStorage
object to see what is currently stored. Theopolisme (talk) 20:36, 14 March 2014 (UTC)
- Web storage#Storage_size might be useful. It's still not entirely clear though, and different browsers vary in how they handle storage. You can look at the
- I see... wikEd seems to be filling most of mine... Disabling wikEd clicking the icon on the page doesn't help. I wonder if there is a way we can clear the wikEd data... Cacycle, is there a way that you could have wikEd not store "wikEdFindHistory", "wikEdReplaceHistory", and "wikEdSummaryHistory" if &action !== edit|submit or if "wikEdDisabled" === 1? — {{U|Technical 13}} (t • e • c) 21:16, 14 March 2014 (UTC)
- You can manually remove specific items as well if you'd like,
localStorage.removeItem( 'key' )
. Theopolisme (talk) 21:49, 14 March 2014 (UTC)
- You can delete wikEd's history fields by clicking the
button on its control button bar on the right. But the amount of stored data is extremely small and cannot be the cause of reaching the storage quota, especially comparing to the amount of data stored in MediaWikiModuleStore:enwiki. Cacycle (talk) 12:44, 17 March 2014 (UTC)
- You can delete wikEd's history fields by clicking the
- You can manually remove specific items as well if you'd like,
- I went to my about:config and searched for "dom.storage.default_quota" and doubled the value from "5120" to "10240" for now. This is just a hack solution however, but I have some ideas for a better one. — {{U|Technical 13}} (t • e • c) 12:56, 17 March 2014 (UTC)
Decline hangs
{{resolved}}
Declining hangs with "Use of mediawiki.api callback params is deprecated. Use the Promise instead." It does say that it "Saved Draft:" and "Saved User talk:" which are confirmed in [1] and [2] respectively. — {{U|Technical 13}} (t • e • c) 12:57, 14 March 2014 (UTC)
- Technical 13: Huh, interesting. The mw.api callback warnings aren't related to the rewrite script, unless something really funky is going on (I'm not getting them), so they must be from some other script you're running that calls the API using the old method
var api = new mw.Api();
// the old way to do it, deprecated
api.get( { action: 'query' }, function ( data ) { console.log( data ) } );
// as opposed to the new way using a $.Promise
api.get( { action: 'query' }.done( function ( data ) { console.log( data ) } );
- I'm also not able to replicate the hang, although it may be because you're on a slower browser or something. Could you paste in your user agent? Theopolisme (talk) 16:41, 14 March 2014 (UTC)
alert(navigator.userAgent);
returnsMozilla/5.0 (Windows NT 6.0; rv:27.0) Gecko/20100101 Firefox/27.0
- I'm unable to recreate the hanging at this time too... I'm not getting the mw.api callback warning anymore either, so I'm guessing it was an API fluke or something at this point.
- Technical 13, just let me know if the problem crops up again and we can reinvestigate. Theopolisme (talk) 17:26, 14 March 2014 (UTC)
Notice on user talk page has no header
{{resolved}}
Declining posted the template on the user's talk page, but did not give it a header. — {{U|Technical 13}} (t • e • c) 13:32, 14 March 2014 (UTC)
Done, thanks :) All of the recent fixes in response to your issues are now live too. Theopolisme (talk) 17:21, 14 March 2014 (UTC)
Review submission showing up on inappropriate pages
{{resolved}}
I am posting this feedback from Wikipedia:Miscellany for deletion/User:TheShadowCrow/sandbox/Youri Raffi Djorkaeff and I'm entirely unsure of how the script is running on this page (I can't see it in the coding). — {{U|Technical 13}} (t • e • c) 12:48, 16 March 2014 (UTC)
- Gotcha, thanks.
Fixed and pushed :) Theopolisme (talk) 19:31, 16 March 2014 (UTC)
Not patrolling submissions
The rewrite is not patrolling pages and I'm having to go back and do it manually. This is annoying and wasting time that I could be spending reviewing... — {{U|Technical 13}} (t • e • c) 18:52, 17 March 2014 (UTC)
Add WikiProjects
{{resolved}}
I'm approving Roger's template submission for WP:WikiProject Disability and when I try to enter the WikiProject in the WikiProject line, it rejects it since it is not on the list. There has to be a better way to do this. It should be able to pass whatever is in the input line through as if it was on the list even if it isn't. The "list" should only be for assisting people in finding a specific project or if there is questionable case or spelling. There should also be a log page of all WikiProjects entered on that line that are not on the current list which would allow for addition of those projects to the list if they are used enough. — {{U|Technical 13}} (t • e • c) 14:14, 20 March 2014 (UTC)
- A log page is quite a bit of work... but, as I've become pretty adept at hacking this jquery.chosen plugin (dynamic categories, oh yeah!), I just coded "custom WikiProject" functionality. Please try it out and let me know your thoughts! :) Theopolisme (talk) 23:30, 20 March 2014 (UTC)
Adding an odd category to all approved submissions.
{{resolved}}
See this accepted disambig for details. — {{U|Technical 13}} (t • e • c) 20:38, 20 March 2014 (UTC)
- More examples
- Kamaljit Singh Garewal
- Chesya Burke
- Template:WP Disability Invite (kind of confusing chain of events with this one, but still shows the [[Category:]] issue)
- — {{U|Technical 13}} (t • e • c) 21:20, 20 March 2014 (UTC)
- Should be
fixed, thanks Technical 13 :) Theopolisme (talk) 23:40, 20 March 2014 (UTC)
- Should be
0.5 released
{{resolved}}
Version 0.5 has been released. It includes G13 functionality, custom WikiProject tagging, and a number of other improvements, tweaks, and fixes. Give it a whirl if you're so inclined! :) Theopolisme (talk) 03:04, 22 March 2014 (UTC)
[0.5] Feedback about article review
{{resolved}}
Hello - trying out the new AFCH interface. It might be nice to have the script do a check, and if the name of the article is "sandbox", not send a message counting how many times that article name has been deleted. —Anne Delong (talk) 22:15, 22 March 2014 (UTC)
- Makes sense, thanks! Done. Theopolisme (talk) 22:39, 22 March 2014 (UTC)
Going back?
{{resolved}}
Hello - first reviewing experience: I want to mark a submission as being reviewed, but the option was hidden. I clicked on the arrow to reveal the option, but my aim was a little off and I ended up clicking on the edge of the "Comment" box. I didn't want to post a comment, but the other options were no longer visible. I tried the back button, but that took me to a previous page. I solved the problem with a reload and started over. On second try I was able to mark the submission as under review. I suppose the big buttons are for people with tiny screens..... —Anne Delong (talk) 22:45, 22 March 2014 (UTC)
- There's a back button in the upper lefthand corner or the review panel; did you use that? Hmm, I wonder if we should consider support the in-browser back button as well... also, the arrow is actually designed to be hovered upon, not clicked -- but you're right, that is definitely unclear. All good stuff! Theopolisme (talk) 23:30, 22 March 2014 (UTC)
- Hovering is not an option on touch screens (like when I'm reviewing from my mobile phone), it is possible to click and still get it to work, but it is extremely difficult. Probably not the best option. Also, the "back" link in the tool is very unclear and not well separated from the leave feedback link. — {{U|Technical 13}} (t • e • c) 01:06, 23 March 2014 (UTC)
- Righto, I wonder if the solution to that is actually moving the leave feedback link rather than the back arrow (which, coincidentally, I've made larger and blockier which should help with it as a click target)... I've replied about the additional options arrow in an above thread. Theopolisme (talk) 01:29, 23 March 2014 (UTC)
- To answer your question, no, I didn't see the back button - it just seemed like part of the "Give feedback". The little separator line is not noticeable even on my large screen. Also, reviewers aren't used to looking for a back button, because in the old script the little row of options was always visible. Maybe instead of a back arrow it should be a little word "Options" or something; I already have two back arrows on my screen - one for browser tabs and one for going back a page, and I regularly press the wrong one. —Anne Delong (talk) 02:19, 23 March 2014 (UTC)
Thanks for your feedback. I've attempted to make the back link more noticeable; please let me know your thoughts. (Note that to do this I removed the feedback link, but I'll be looking into how to reinstate it shortly...) Theopolisme (talk) 17:02, 23 March 2014 (UTC)
- The back feature is considerably more noticeable. Because the other text is so large, there would be plenty of space right underneath the back option for a feedback link. —Anne Delong (talk) 14:28, 24 March 2014 (UTC)
Indented decline reason list
{{resolved}}
I completed a review. I like the way that you have indented the items on the decline reason list - it solves something that I complained about in the old script - difficulty in spotting the reason I wanted in a long list in which I couldn't distinguish the headings from the items. —Anne Delong (talk) 01:04, 23 March 2014 (UTC)
- Good to hear, thanks! Theopolisme (talk) 23:39, 27 March 2014 (UTC)
[0.5] Postpone G13
{{resolved}}
Hello again. This time I am looking at G13 eligible submissions. I didn't see a "Postpone" function, so I tried to use my touch screen to go to the hidden options to see if it was there. I managed to accidentally nominate the page for deletion, since that was the rightmost option (sigh). —Anne Delong (talk) 03:14, 23 March 2014 (UTC)
- Thanks, good catch! I haven't implemented this feature yet, but will do shortly. Theopolisme (talk) 15:21, 23 March 2014 (UTC)
Done, the postpone option will now appear in the regular row of buttons. Theopolisme (talk) 17:03, 23 March 2014 (UTC)
Afc comment
{{resolved}}
Last evening I added a comment to a new Afc submission, and I noticed that you added a feature to notify the user. This is great, because new users don't always know about watchlists. Without declining the article I was able to get the editor started on changing the external links into references and wikilinks. A useful addition. —Anne Delong (talk) 14:24, 24 March 2014 (UTC)
- Great! :) Theopolisme (talk) 23:39, 27 March 2014 (UTC)
Submit, then accept
{{resolved}}
Today I was told by a user at a Wikiproject that an old Afc submission had been improved and was ready for mainspace. I used the new script to submit the article in the name of the original submitter, who did most of the work. The script worked fine. My next step was to accept the submission, so I therefore clicked on the options link provided, but the "submit" was not on the list. I reloaded the page and then it worked. This wasn't necessary with the old script, but I'm not sure why. Maybe even if the page wasn't visually reloaded, it would have been saved, so maybe the old script rechecked the submit status each time before displaying the options and the new one doesn't. —Anne Delong (talk) 18:28, 24 March 2014 (UTC)
- Thanks Anne! I've updated the script to handle this. Also, I've added whitelist-checking functionality using the participants list with a link to that page if the user isn't listed...let me know if you spot any errors with that :) Theopolisme (talk) 16:15, 26 March 2014 (UTC)
Multiple Db-templates
{{resolved}}
The rewrite added two difrent db-templates. See this picture. (t) Josve05a (c) 12:39, 28 March 2014 (UTC)
- Thanks! I've fixed this, and the fix should become live later today. Theopolisme (talk) 13:03, 28 March 2014 (UTC)
db-g12 urls
{{resolved}}
Since the db-g12 can have up to 3 url's, then so should the script and AfC-submission template, to make it easier for the admin when deleting the page. (t) Josve05a (c) 13:06, 28 March 2014 (UTC)
- 2 URLs should probably be enough (or at least pretty decent) -- and that's what I've just implemented. Will be live soon! Theopolisme (talk) 01:24, 29 March 2014 (UTC)
Placeholder text bug
{{resolved}} See this. Is it possible for the default text in the "additional comments" box to not appear by default if you do not wish to leave another comment (and forget to clear the box....) --Mdann52talk to me! 13:24, 28 March 2014 (UTC)
- That's definitely a bug! Whoopsies -- fixed now and will be live later. :) Theopolisme (talk) 23:18, 28 March 2014 (UTC)
Postpone G13 - comments
{{resolved}}
Hello again! I used the new script to postpone a db-g13 eligible submission, but it didn't give me an option to leave a comment. Not serious, as I can always leave one separately, but the old script includes this. Since there is a comment option available, maybe this is a design decision; however, postponers are more likely to leave a postponement rational if the comment dialogue box is displayed automatically. —Anne Delong (talk) 10:49, 29 March 2014 (UTC)
- That was something I had Theo add to the original script and I'm sure he just overlooked adding it to the rewrite or hadn't gotten to it yet. Thanks for mentioning it Anne. :) — {{U|Technical 13}} (t • e • c) 13:16, 29 March 2014 (UTC)
- Yep, on my todo list. Theopolisme (talk) 13:54, 29 March 2014 (UTC)
Done, now live on enwiki. :) Theopolisme (talk) 14:13, 29 March 2014 (UTC)
Sandbox templates
{{resolved}}
I used the script to leave a comment on a page that had been moved from a sandbox. Does a cleaning process happen when a comment is left? And, if so, are sandbox templates supposed to be removed as part of the cleaning? —Anne Delong (talk) 00:04, 30 March 2014 (UTC)
- "Does a cleaning process happen when a comment is left?" → It does. "are sandbox templates supposed to be removed as part of the cleaning?" → Not currently, but it is a good idea. I think the tough part is being able to find all of the user sandbox template variations and making sure that the proper submission template has been posted and the article is at the proper title (some templates indicate where the submission should be in a parameter in cases where the draft is at User:.../sandbox) before removing them. — {{U|Technical 13}} (t • e • c) 02:26, 30 March 2014 (UTC)
- Well, even if the most common ones were done it would be a help. The old script does clean the sandboxes - why not just copy the code? —Anne Delong (talk) 02:33, 30 March 2014 (UTC)
This was just an oversight on my part; will be fixed momentarily. Theopolisme (talk) 02:44, 30 March 2014 (UTC)
- Well, a "moment" turned into an hour, but this is now live on enwiki ;) Theopolisme (talk) 03:43, 30 March 2014 (UTC)