Problem:
Entity Usages are meaningful for two purposes:
1- They enable change propagation and pages are up to date when the data in Wikidata is changed.
2- Then people are notified with this update in Recent Change table, this increases the transparency and clarity.
Currently, many modules are designed to use Wikidata data for maintaining some organization about the article (most common example: categorization). This means not all Entity Usages are meant to be directly displayed on the page. They sometimes are being used to decide if the Wikidata item has an image, with no intention using this image.
However, these usages are not irrelevant or unnecessary either. It still makes sense to propagate changes to these articles to maintain categorization (or other side functions). On the other hand all of the updates about these entities might not be relevant for Recent Change table, as they don't have a direct effect on the page (and we try to reduce the load in RC table).
Example1:
Template: https://fr.wikipedia.org/wiki/Mod%C3%A8le:Infobox_Biographie2
Page: https://fr.wikipedia.org/wiki/Ry%C5%8Dichir%C5%8D_Yoshida
Entity Usage:
Japon
Déclaration : P571
créateur ou créatrice
Déclaration : P279
...
artiste
Déclaration : P279
...
musicien ou musicienne
Déclaration : P279
...There is no reason to create a Recent Change log for all musician articles when item createur is updated, but there is a reason that any change on createur should be propagated.
Example2:
Template: https://en.wikipedia.org/wiki/Template:Wikidata image
Page: https://en.wikipedia.org/w/index.php?title=Benson_Jack_Anthony&action=info
P18 is only being accessed to add some categories No_local_image_but_image_on_Wikidata not to be displayed on the page.
Solution:
To keep the same behavior and not creating noise in RC table, we create soft and hard type Entity Usages.
| Soft | Changes propagated, page will be reparsed | No Recent Change log created | For more indirect usages, i.e. existence checks in modules | A new type of behavior |
| Hard | Changes propagated, page will be reparsed | Recent Change log created | For usages directly affecting the page | The current behavior |
Challenges:
It is not always very clear to distinguish soft and hard usages. This work has to go closely with module observation. From our previous investigation (T410630 and T403008), we already know a very common pattern is existence checks in if blocks and transitive calls are causing indirect Entity Usage which will be mentioned as soft after this ticket is implemented.
Acceptance criteria:
- New functions for soft usages for users to use should be created and they should be documented.
- Wikipedia article page categorizations based on Wikidata data should be kept. The current behavior on client side should remain same
- Entity Usage table size should remain the same.
- If there are both soft and hard EU of the same statement, hard one should override the the soft so they still will be a single log on EU table.
Next step:
Use new soft and hard entity usage implementation in modules