Page MenuHomePhabricator

Provide JavaScript hook
Closed, DeclinedPublic

Description

When I open [[d:Q11205]] the script
https://www.wikidata.org/wiki/MediaWiki:Gadget-AuthorityControl.js
changes the value "513" of the [[d:Property:P1036]] (Dewey Decimal Classification) into a link. But this link disappears if I click on edit and then cancel (or save, etc...). There should be a hook[1] which the gadget could use for this.

I don't know if the hook 'wikipage.content' should be fired, or created a new one for this

[1] https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.hook


Version: master
Severity: enhancement
Whiteboard: papercut

Details

Reference
bz57765

Related Objects

StatusAssignedTask
DeclinedNone
OpenNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedadrianheine
ResolvedNone
ResolvedNone
ResolvedNone
OpenNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
ResolvedNone
Resolvedthiemowmde
ResolvedNone
DeclinedNone
Resolvedthiemowmde
DeclinedLydia_Pintscher
DeclinedNone
OpenNone
Resolvedthiemowmde
InvalidNone
DeclinedNone
OpenNone
Openthiemowmde
Resolvedadrianheine
Resolvedadrianheine
Resolvedadrianheine
ResolvedNone
Resolvedadrianheine
InvalidNone
Declined Jonas
ResolvedNone
Resolvedadrianheine
Resolvedadrianheine
Invalidthiemowmde
Resolvedadrianheine
Resolvedthiemowmde
OpenNone
OpenNone
StalledNone
ResolvedLea_Lacroix_WMDE
ResolvedLucas_Werkmeister_WMDE
ResolvedLucas_Werkmeister_WMDE
Resolvedmatej_suchanek
ResolvedLea_Lacroix_WMDE

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz57765.
bzimport added a subscriber: Unknown Object (MLST).
He7d3r created this task.Nov 30 2013, 9:43 AM

Can you please explain why you want this?

Because the current behaviour is confusing:

If I open the page of an item which already has a Dewey classification (e.g. [[d:Q11205]]), I see a link, but if I go to an item which doesn't, and add it, there is no link and the natural thinking is that I provided the wrong value and should have added a [http:... link] (and this is not the case).

E.g. I just went to [[d:Q122653]], clicked on "add", filled the "property" field with "P1036" and added the value "513.5" and saved. The result was a simple text instead of a link pointing to
http://dewey.info/class/513.5/about

If Wikidata fired a hook when the saving process is finished, the gadget could use that to bind the event which converts a text to a link, and display it to the user right after the new value is saved.

Providing a hook for this does have the potential to make the current performance issues much worse. I suggest to keep this report open as a feature-request but downgrade it and talk about possible solutions a lot later.

From what I remember, what is slow is to view the items. Saving (or cancelling the save) is fast.

I've been thinking about this and I think the better approach is to properly integrate the feature the authority control gadget provides into Wikibase. I need to think more about the best way to do this.

Where is that integration being tracked?