Page MenuHomePhabricator

Adjust AuthorityControl Gadget to snakview name changes
Closed, ResolvedPublic

Event Timeline

Tobi_WMDE_SW raised the priority of this task from to High.
Tobi_WMDE_SW updated the task description. (Show Details)
Tobi_WMDE_SW added a project: Wikidata.

ideally this fix is on top of fix for T89259

Change 193565 had a related patch set uploaded (by Aude):
_createQualifiersListview in statementview not just in edit mode

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

changes I needed to make: (and not to make on wikidata yet)

https://www.wikidata.org/w/index.php?title=User%3AAude%2Fauthority.js&diff=199876238&oldid=199794643

also, I noticed references and qualifiers were not being linked unless the given reference property or qualifier property was already used somewhere in the item as a main snak property. this fixes it with what is certainly ugly javascript code. I am sure I could make the code better. Also, maybe getUsedPropertiesFromEntity belongs in wikibase data model javascript or somewhere in the code base, instead of a gadget.

https://www.wikidata.org/w/index.php?title=User:Aude/authority.js&oldid=200280349

made the code a bit better, using EntityInitializer and data model js, and adjusted the css selectors for the gadget to work with both the existing deployed code and master. (e.g. the gadget could be updated now)

I do have some concerns though that the gadget is (via api request) finding all (of the referenced properties) that have P1630, to construct PROPERTIES array. It might be better performance wise if this list was cached (maybe maintained as json on wiki by a bot).

https://www.wikidata.org/w/index.php?title=User:Aude/authority.js&oldid=200606764 are the minimal changes needed.

this leaves the issue there of "references and qualifiers were not being linked unless the given reference property or qualifier property was already used somewhere in the item as a main snak property" but think that would be better solved by having a bot maintain the PROPERTIES array, cached on js/json page on wiki that the gadget can use.

Adjustments after snakview name changes have been made and it is working on beta. The issue with qualifiers and references not linked is a different one, so I've created T91408 for it.

adrianheine raised the priority of this task from High to Unbreak Now!.Mar 4 2015, 7:49 AM
adrianheine moved this task from Backlog to Done on the § Wikidata-Sprint-2015-02-03 board.