Page MenuHomePhabricator

Review and update the Examples extension
Open, NormalPublic

Description

Other than ContentAction, which was touched during GCI, the code in the Examples extension hasn't really been touched for a few years. It would be nice to give it a spring clean, updating code to follow modern coding practices for MediaWiki extensions.

Additional cleaning up to-do

See Also: T97105: BoilerPlate extension should show latest coding practices

Event Timeline

TTO created this task.Jan 29 2017, 1:47 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 29 2017, 1:47 AM
RHeigl added a subscriber: RHeigl.

Meets a requirement of the MediaWiki Usage Report 2015: Developer support

This project is selected for the Developer-Wishlist voting round and will be added to a MediaWiki page very soon. To the subscribers, or proposer of this task: please help modify the task description: add a brief summary (10-12 lines) of the problem that this proposal raises, topics discussed in the comments, and a proposed solution (if there is any yet). Remember to add a header with a title "Description," to your content. Please do so before February 5th, 12:00 pm UTC.

TTO added a comment.Feb 4 2017, 7:52 AM

@srishakatux: The current title and description of this task are clear enough for anyone who understands what this is about. As for solutions, it's an open-ended task which can be marked resolved when someone decides that the Examples extension follows modern practices.

Related to this would also be to maintain something like MWStew to make initialising extensions easy and up to date.

D3r1ck01 added a subscriber: D3r1ck01.
Aklapper triaged this task as Low priority.Oct 7 2017, 7:08 PM
Aklapper updated the task description. (Show Details)

Could have some fun with this!

Change 452854 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Update Example extension to mordern coding practice of MW extensions

https://gerrit.wikimedia.org/r/452854

D3r1ck01 claimed this task.EditedAug 14 2018, 10:43 PM
D3r1ck01 added a subscriber: Qgil.

So following modern practices, the extension name would be changed from "examples" to "Example" extension to match the naming of the documentation here: https://www.mediawiki.org/wiki/Extension:Example.

Should the name be Example or Examples? Cc @Qgil, @srishakatux, your inputs please :)

Just poked around a little bit and found some inconsistency with the naming. In some places, I see that the name is examples[1] and in some I see Example[2] and in some, I see Examples[3]. So which one are we going in for see below;

[1] https://gerrit.wikimedia.org/g/mediawiki/extensions/examples
[2] https://www.mediawiki.org/wiki/Extension:Example
[3] MediaWiki-extensions-Examples

Aklapper removed a subscriber: Qgil.Aug 15 2018, 2:24 AM

Not something that Qgil is invoked with hence removing. Thanks for working on this!

Okay @Aklapper, so could you give a helping hand with the naming? Should we go for examples, example, Examples or Example and why? Also, if we choose Example or Examples, some places (such as; Extension doc page depending on the name) would need some renaming. Thanks

Looking at the current state of the extension, one can see a trend. It seems the extension would want to have sub-extensions inside for demonstration (examples?), if so, I think the best name would be Examples. In the parent extension structure, I can see sub-extension for demo such as; ContentAction, DataPages, and Example.

So following modern practices, the extension name would be changed from "examples" to "Example" extension to match the naming of the documentation here: https://www.mediawiki.org/wiki/Extension:Example.
Should the name be Example or Examples? Cc @Qgil, @srishakatux, your inputs please :)
Just poked around a little bit and found some inconsistency with the naming. In some places, I see that the name is examples[1] and in some I see Example[2] and in some, I see Examples[3]. So which one are we going in for see below;
[1] https://gerrit.wikimedia.org/g/mediawiki/extensions/examples
[2] https://www.mediawiki.org/wiki/Extension:Example
[3] MediaWiki-extensions-Examples

I personally would go for Examples it seems to make most sense and also fits common naming rules. When you finished with updating the code, renaming could be taken care of. Since it's not really deployed anywhere it shouldn't be too hard.

Qgil removed a subscriber: Qgil.Aug 22 2018, 3:57 PM

Change 454593 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Add license file to the repository

https://gerrit.wikimedia.org/r/454593

Change 454596 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Add documentation to missing keys in qqq.json

https://gerrit.wikimedia.org/r/454596

Change 454598 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Add README.md file to the repository

https://gerrit.wikimedia.org/r/454598

Change 454599 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Add package.json to the repository

https://gerrit.wikimedia.org/r/454599

Change 454602 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Add extension.json file for extension's configs

https://gerrit.wikimedia.org/r/454602

Change 454604 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Add JS task runner file "Gruntfile.js"

https://gerrit.wikimedia.org/r/454604

Change 454607 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Add linter files for project configs

https://gerrit.wikimedia.org/r/454607

Change 452854 abandoned by D3r1ck01:
Update Example extension to mordern coding practice of MW extensions

Reason:
Broken into smaller patches: I610b44ba904e72, Iee97f1aa2ca5f3, I77684c1e97492e, Ia8c3638fe82c7f, Ifdcf1e2fb2168a, I89ff1de40eae1e and I505aa259a524e1.

https://gerrit.wikimedia.org/r/452854

D3r1ck01 raised the priority of this task from Low to Normal.Aug 23 2018, 5:54 PM

Change 454596 merged by jenkins-bot:
[mediawiki/extensions/examples@master] Add documentation to missing keys in qqq.json

https://gerrit.wikimedia.org/r/454596

Change 454599 abandoned by D3r1ck01:
Add package.json to the repository

Reason:
Merged into this commit: Iee97f1aa2ca5f33e1878.

https://gerrit.wikimedia.org/r/454599

Change 454602 abandoned by D3r1ck01:
Add extension.json file for extension's configs

Reason:
Merged into this for proper CI tests: Iee97f1aa2ca5f33e18.

https://gerrit.wikimedia.org/r/454602

Change 454607 merged by jenkins-bot:
[mediawiki/extensions/examples@master] Add linter files for project configs

https://gerrit.wikimedia.org/r/454607

Change 454604 merged by jenkins-bot:
[mediawiki/extensions/examples@master] Add JS task runner file "Gruntfile.js"

https://gerrit.wikimedia.org/r/454604

Change 454593 merged by jenkins-bot:
[mediawiki/extensions/examples@master] Add license file to the repository

https://gerrit.wikimedia.org/r/454593

Change 455580 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[mediawiki/extensions/examples@master] Port of extensions registration to more recent format

https://gerrit.wikimedia.org/r/455580

D3r1ck01 updated the task description. (Show Details)Aug 27 2018, 4:14 PM
D3r1ck01 updated the task description. (Show Details)Sep 1 2018, 12:55 PM
D3r1ck01 updated the task description. (Show Details)Sep 1 2018, 1:06 PM

Change 454598 merged by jenkins-bot:
[mediawiki/extensions/examples@master] Add README.md file to the repository

https://gerrit.wikimedia.org/r/454598

Magol added a subscriber: Magol.Dec 4 2018, 5:37 PM

Change 455580 merged by jenkins-bot:
[mediawiki/extensions/examples@master] Update Example extension with various best practices

https://gerrit.wikimedia.org/r/455580

Tgr awarded a token.Jan 6 2019, 9:37 PM
Tgr updated the task description. (Show Details)
Tgr updated the task description. (Show Details)
Tgr added a subscriber: Tgr.Jan 6 2019, 9:39 PM

Nitpick: why rename from Example to Examples and not the other way around? It's an example extension.

Nitpick: why rename from Example to Examples and not the other way around? It's an example extension.

Nice point @Tgr, but from what I see, it seems like it's a combination of different example(s), hence Examples. Take a look at the extension ATM to see what I'm talking about or maybe I'm missing something?

Tgr added a comment.Jan 7 2019, 1:47 AM

Oh, you are right, I did not realize that from looking at the patch.

Restricted Application added a project: User-D3r1ck01. · View Herald TranscriptJul 30 2019, 11:09 PM
Huji updated the task description. (Show Details)Aug 7 2019, 10:17 PM
D3r1ck01 removed D3r1ck01 as the assignee of this task.Aug 21 2019, 12:12 PM
D3r1ck01 removed a project: Patch-For-Review.