Wikipedia talk:WikiProject Articles for creation/Helper script/Rewrite
This page is for feedback about the rewritten Articles for creation helper script. See the rewrite page for more information.
[0.3] Feedback about article review
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
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)
More notes.
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)
Decline hangs
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
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)