Page MenuHomePhabricator

Add snak hashes to entity HTML output
Closed, ResolvedPublic

Description

To make snaks of any kind identifiable in the DOM, we should add their IDs / hashes to the HTML, as classes (not as element id: one snak can appear several times in the same entity). This is required for T168532: Check constraints on qualifiers and references.

This slightly increases the page size, but not excessively: even for large entities, the increase is only slightly above 5%, and typical entities seem to grow by 1-3% (see gist).

Event Timeline

The PHP side of this is easy, but it looks like the JS side of this will require T171607: Main snak and reference snaks do not include hash in JSON output (including for wbsetclaim and similar API actions).

Change 373858 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Propagate statementview changes to subwidgets

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

Change 373860 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] Add snak hashes to entity HTML

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

Change 373858 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Propagate statementview changes to subwidgets

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

Lucas_Werkmeister_WMDE renamed this task from Add snak IDs to entity HTML output to Add snak hashes to entity HTML output.Aug 31 2017, 4:03 PM

Change 373860 merged by Thiemo Mättig (WMDE):
[mediawiki/extensions/Wikibase@master] Add snak hashes to entity HTML

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

thiemowmde assigned this task to Lucas_Werkmeister_WMDE.
thiemowmde triaged this task as Low priority.
thiemowmde removed a project: Patch-For-Review.
thiemowmde moved this task from Review to Done on the Wikidata-Former-Sprint-Board board.
thiemowmde added subscribers: thiemowmde, WMDE-leszek.