MediaWiki talk:Gadget-StructuredCategories.js

Edit request - global variables, and a few other fixes edit

Following up to a discussion here (in French), I had a look at the code of this gadget and noticed a few things to fix.

I made a fork here, and I would like the changes to be backported to the upstream gadget here.

Thanks in advance. Od1n (talk) 02:18, 1 November 2022 (UTC)Reply

@Od1n I created you a local sandbox for confirmation: User:Od1n/Gadget-StructuredCategories.js. Is this the exact change you would like made here? (Feel free to tag that local sandbox for speedy deletion when this is done). — xaosflux Talk 14:59, 1 November 2022 (UTC)Reply
Ping to User:Csisc who has also worked on this for any feedback. — xaosflux Talk 15:01, 1 November 2022 (UTC)Reply
Yes, these are the whole changes. It depends if you are fine with merging everything in a single commit, but the diff will be unreadable, or if you are willing to cherry-pick the changes. You may also pick only the functional changes and leave apart the coding style changes. As you prefer. Od1n (talk) 15:26, 1 November 2022 (UTC)Reply
If you cherry-pick the functional changes, you can do it in 4 commits: [ 198278719+198279542 ], 198278790, 198279578, and 198296694. Od1n (talk) 15:32, 1 November 2022 (UTC)Reply

Xaosflux: I have reviewed the recent changes provided by Od1n and I fully agree to apply them to the script at the MediaWiki namespace. Well done, Od1n. Csisc (talk) 06:25, 2 November 2022 (UTC)Reply

  Done @Od1n and Csisc: the new version has been merged in, if any issues please let me know. — xaosflux Talk 08:37, 2 November 2022 (UTC)Reply

Second merge edit

Thanks! Could you also merge this change please? (by the way, I also implemented a system to make the query readable in the code, see it here, it works well, but maybe wait we can rather use ES6 template strings) – Od1n (talk) 16:24, 2 November 2022 (UTC)Reply
@Xaosflux: Excellent work. @Od1n: I ask whether this can be merged too or not. --Csisc (talk) 16:49, 3 November 2022 (UTC)Reply
If you are asking about the unencoded query in the code, and its accompanying "multiline string" system, yes I would bend towards merging it to the upstream code. I have tested it and it seems to work properly. I think it would bring many more code reviewers, to fix/improve the query. Od1n (talk) 17:08, 3 November 2022 (UTC)Reply
Return to "Gadget-StructuredCategories.js" page.