Page MenuHomePhabricator

Action API tutorials
Closed, ResolvedPublic

Description

This task is part of a project to improve processes and standards for Wikimedia technical documentation. For more information, visit the project page on mediawiki.org

Criteria

  • Typos: The page has been reviewed for typos.
  • Inclusive language: The page uses inclusive, non-gendered language.
  • Working examples: Commands and examples have been tested or reviewed for accuracy.
  • Links: Links on the page work.

Docs

Notes

Event Timeline

KBach changed the task status from Open to In Progress.Jun 29 2022, 10:22 AM
KBach claimed this task.

Reviewed API:Holidays viewer https://www.mediawiki.org/wiki/Special:MyLanguage/API:Holidays_viewer and would like to share a few thoughts/comments/questions:

  1. Is it a good practice for us to make use of CDNs, Google Fonts, and similar, in our code examples? Google Fonts, for example, was recently ruled in violation of GDPR by a court in Germany (end of Jan 2022). I am not sure about CDNs in general, but they might fall under a similar category? Considering privacy implications, perhaps it would make sense to minimize 3rd party calls in these code examples? @srishakatux - I think you were a mentor for the initial author of this page, do you have any insight on this that you could share?
  1. Code examples on the page work as designed, but I had trouble following the tutorial. Transitions between some steps were unclear to me. I think we could improve it a bit. @apaskulin, do you think it makes sense for us to create a new task for such improvements?

@Aklapper great, thank you! Perhaps we should also make the same updates to the code in the GitHub repo: e.g. https://github.com/wikimedia/mediawiki-api-demos/blob/master/apps/holidays-viewer/templates/layout.html - I can do that after I'm done with the review.

@KBach Yes, we may have ignored the implications around loading from third parties then. Thanks for catching that. I'm happy to make any follow-up changes to the code also. When you have completed the review, either assign any code-related changes or ping me, and I will create new tasks accordingly.

Reviewed API:Nearby places viewer.

  • Made minor edits for clarity.
  • Corrected the name of the stylesheet that should be edited in Step 2 (static.css -> style.css).
  • Removed the link to the archived Discourse instance.
  • Removed the link to Twilio Docs as they don't have a clear landing page for Python developers. We could link to https://www.twilio.com/docs/quickstart/python or any of the pages listed on https://www.twilio.com/docs/search?q=python+quickstart but I don't think these are particularly helpful in the context of this tutorial.
  • Updated links to Flask/Flask tutorials.

Reviewed API:Picture of the day viewer.

  • Made minor edits for clarity.
  • Added missing code to the final CSS example (code for .date-navigator was present in the code repository but not in the example, making the final application look different from the screenshot.
  • Removed the link to the archived Discourse instance.
  • Updated outdated links.

Two questions about this one:

  • The app demo on Toolforge exhibits a strange behavior - when pressing Back or Next, it does not change the date by one, but actually moves to a seemingly random date. This is probably because the current date is stored in a global variable - it's essentially state shared between multiple users. I assume that if two or more users click buttons, the current date will change by more than one for at least one of them. Is this something we would want to fix, or just add a disclaimer that it's the correct behavior?
  • The Next steps section mentions action=cirrusdump, with a link to an example that probably does not work. Can anyone provide a working example, or should we just link to Extension:CirrusSearch or similar?

Reviewed https://www.mediawiki.org/wiki/API:Article_ideas_generator.

  • Made minor edits to improve clarity.
  • Expanded code snippets slightly to allow readers to copy and paste code without breaking the application.
  • Updated links and removed the link to Twilio as in my previous comment.
  • Added Requests as a dependency that needs to be installed.

Three comments on this one:

  • I'm not sure if the application works correctly. If you go to Social sciences and then Genealogy, you will get the same ideas as in Social sciences - Other social and cultural issues, despite differences on the relevant wiki page. @srishakatux perhaps you can take a look?
  • There is still a bit of a leap between the last step of the tutorial and the final outcome in terms of styling and behavior of the application. We could probably improve that.
  • Code added in step 4 breaks the application. Readers need to continue with code from step 5 to fix it.

@srishakatux if you still want to propagate changes introduced by @Aklapper to the repo, please go ahead (I think it's best if we do that in a separate task though?).

I think we can close this task, but perhaps we should create a new one for additional, minor improvements in these docs? Do you think this makes sense @apaskulin, @Aklapper ?

@srishakatux if you still want to propagate changes introduced by @Aklapper to the repo, please go ahead (I think it's best if we do that in a separate task though?).

Split into T312928

I think we can close this task, but perhaps we should create a new one for additional, minor improvements in these docs?

Sounds good to me.

I think we can close this task, but perhaps we should create a new one for additional, minor improvements in these docs?

Sounds good to me.

Split into T312942

I think we can close this task, but perhaps we should create a new one for additional, minor improvements in these docs? Do you think this makes sense?

Sounds good. I think we can go ahead and close this as resolved. Thanks for your work on this, @KBach!