Page MenuHomePhabricator

Adjust AuthorityControl Gadget to snakview name changes
Closed, ResolvedPublic

Event Timeline

Tobi_WMDE_SW updated the task description. (Show Details)
Tobi_WMDE_SW raised the priority of this task from to High.
Tobi_WMDE_SW added a project: Wikidata.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 29 2015, 2:43 PM
Lydia_Pintscher added a subscriber: thiemowmde.
aude added a comment.Feb 27 2015, 4:47 PM

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

aude added a comment.Feb 28 2015, 10:23 AM

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.

aude added a comment.Mar 1 2015, 12:46 PM

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).

Tobi_WMDE_SW assigned this task to aude.Mar 2 2015, 7:41 AM
aude added a comment.Mar 2 2015, 10:34 AM

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.

Tobi_WMDE_SW closed this task as Resolved.

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!.