Page MenuHomePhabricator

[stretch] Automatically set all Z60/Language parameters to the target language of the auto-article being rendered, and all Z20420/Date parameters to the date of rendering
Closed, ResolvedPublic

Description

Description

When creating Abstract Content, we often need to fill function call inputs with the page arguments:

  • Z825K1: Wikidata item reference
  • Z825K2: Current language
  • Z825K3: Today's date

To make the editors journey a bit less tedious, we can prefill these argument references when we create instances for these types.


Questions

Do we only prefill language and date, or do we also prefill Wikidata item and item reference?

While date and language might always generally be replaced with the page language and date argument references, Wikidata items are different. For creating an abstract function call, we might use the page item, but we will also surely use other Wikidata items that we search and select, so maybe pre-fill these might make the experience worse, not better.


Desired behavior/Acceptance criteria

In the context of an Abstract Fragment:

  • When a function call is created (e.g. user selects function in the lookup), and the inputs are created and populated with the corresponding blank objects, fill up automatically depending on input type:
    • Language inputs: set to Z18( Z825K2 )
    • Gregorian calendar date: set to Z18( Z825K3 )
    • (not sure) Wikidata item: set to Z6821( Z18( Z825K1 ) )
    • (not sure) Wikidata item reference: set to Z18( Z825K1 )
NOTE: This must happen in abstract content ('abstractwiki' keyPath) but never with normal default component behavior.

Completion checklist

Event Timeline

Change #1239968 had a related patch set uploaded (by Genoveva Galarza; author: Genoveva Galarza):

[mediawiki/extensions/WikiLambda@master] Preset new language/date arguments as Z18(Z825K*) in abstract mode

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

Do we also replace wikidata items?

Decision: yes.

Change #1239968 merged by jenkins-bot:

[mediawiki/extensions/WikiLambda@master] Preset new language/date/qid arguments as Z18(Z825K*) in abstract mode

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