Last modified: 2014-10-15 13:28:16 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59765, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57765 - Provide JavaScript hook
Provide JavaScript hook
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Normal enhancement (vote)
: ---
Assigned To: Wikidata bugs
papercut
:
Depends on: 54098
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-30 09:43 UTC by Helder
Modified: 2014-10-15 13:28 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2013-11-30 09:43:01 UTC
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
Comment 1 Lydia Pintscher 2013-11-30 16:18:45 UTC
Can you please explain why you want this?
Comment 2 Helder 2013-12-01 11:08:00 UTC
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.
Comment 3 Thiemo Mättig 2014-02-20 21:44:31 UTC
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.
Comment 4 Helder 2014-02-21 13:29:53 UTC
From what I remember, what is slow is to view the items. Saving (or cancelling the save) is fast.
Comment 5 Lydia Pintscher 2014-10-15 13:11:21 UTC
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.
Comment 6 Helder 2014-10-15 13:28:16 UTC
Where is that integration being tracked?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links