Page MenuHomePhabricator

[25Q1] Let users embed function calls in wikitext which are rendered in the output (for WF itself, not remote wikis)
Open, In Progress, HighPublic

Description

We will add a feature to the WikiLambda stack that powers Wikifunctions, in the WikifunctionsClient extension, allowing users to add function calls from wikitext on developers' local machines, accessible behind a feature flag; it will not be live on Wikifunctions.org. The result will be plain text.

  • (T368604) It will work with text inputs, and parse them into inputs as needed if possible.
  • (T362252) It will work with text outputs, and render them into plain text as needed if possible.
  • It will have user-friendly error handling that adheres to MediaWiki standards.
  • (T362254,T362256, etc.) It will be synchronous with the MediaWiki parse process (and so very slow page renders!).

This is preparatory work for the shippable version, T272516: Provide a mechanism by which editors can make Wikifunctions calls in wikitext, which will be based on the "asynchronous fragments" work MediaWiki group are working on from July 2024 onwards.

Acceptance Criteria

  • Abstract Wiki team developers can demonstrate use of Wikifunctions calls, including the full successful life-cycle of calls being updated, as well as the failure cases of calls being invalid, not working, or other issues prompting editor attention.
  • This demonstration will be of a simple "convert" function or equivalent, e.g. {{#function:Z12345|5|mile|km}} -> "5 miles (8 km)".
  • The team will end the Quarter confident they can apply the prototype, alongside the new Asynchronous Content Fragments technology being built in parallel by the MediaWiki team, to cross-wiki function calls asynchronously rendered, next Quarter.
  • Demo to the team as a video or live demo.

Goals & Success Metrics

  • No regressions or blockers from the actual integration work

Event Timeline

DVrandecic raised the priority of this task from Low to High.Apr 7 2021, 5:07 AM
Jdforrester-WMF renamed this task from Embeddable function calls to Let users embed function calls in wikitext which are rendered in the output.May 5 2021, 5:15 PM
Jdforrester-WMF added a project: Epic.
Jdforrester-WMF renamed this task from Let users embed function calls in wikitext which are rendered in the output to Let users embed function calls in wikitext which are rendered in the output (for WF itself, not remote wikis).May 11 2021, 4:21 PM

Change 694641 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] [WIP] Provide a {{#function:…}} wikitext parser function

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

It's kinda-sorta alive:

image.png (174×1 px, 28 KB)

Needs a bunch of work, but it's making the call…

Change 694641 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Provide a {{#function:\u2026}} wikitext parser function

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

Change 720416 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] parserFunctionCallback: Handle response a bit better

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

Jdforrester-WMF changed the task status from Open to In Progress.Sep 15 2021, 7:16 PM

Change 720416 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] parserFunctionCallback: Handle response a bit better

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

Change 924972 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/extensions/WikiLambda@master] Disable the {{#function:…}} parser function for launch

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

Change 924972 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Disable the {{#function:…}} parser function for launch

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

Jdforrester-WMF renamed this task from Let users embed function calls in wikitext which are rendered in the output (for WF itself, not remote wikis) to [25Q1] Let users embed function calls in wikitext which are rendered in the output (for WF itself, not remote wikis).Jun 18 2024, 2:46 PM