Page MenuHomePhabricator

Add support for url data type (top-level statements and qualifiers)
Closed, ResolvedPublic

Description

Add support for the data type 'URL' for statements and qualifiers on commons

A url data type is essentially a string with constraints - on wikidata it's entered as a string, but it's validated against the property's constraints (it seems - https://www.wikidata.org/wiki/Property:P2699 under constraints)

Users need to be able to add a url for any property that takes urls as a value, in the File page and in UploadWizard

Use cases

The most common use case on Commons is to support listing the URL of a media file’s author/creator. A URL can be a creator’s official website, blog, or user page; a link to the full work; an archive URL; an import URL, or other (see full list of Wikidata properties that use the URL data type).

User story

As a Commons editor, I want to add one or more URLs to a media file’s metadata, so that anyone using that file can access those external resources.

Acceptance criteria:

  • can select a property with data type 'URL' and enter a value for it, on File page and UploadWizard
    • on File page
    • in UploadWizard
  • incorrect values return an error
  • URL is linked

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseMediaInfo : masterEnable support for URL data types

Event Timeline

Cparle created this task.Sep 4 2019, 2:14 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 4 2019, 2:14 PM
Cparle updated the task description. (Show Details)Sep 4 2019, 2:18 PM
Cparle updated the task description. (Show Details)Sep 4 2019, 2:24 PM
Ramsey-WMF triaged this task as High priority.Sep 10 2019, 4:26 PM

Support for URL property types is added in this patch: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseMediaInfo/+/542253. But we're going to need to do a little UI work to improve the user experience before this is really ready for production.

PDrouin-WMF updated the task description. (Show Details)Nov 14 2019, 10:40 PM
PDrouin-WMF updated the task description. (Show Details)Nov 14 2019, 10:53 PM

We have the ability to display these properties in a very basic way right now, but we have not enabled yet because we are working on updating the UI. Most of the team's energy has been focused on getting the machine vision tool out, but that work is mostly complete now so I'm hoping we can improve the situation here shortly.

matthiasmullie added a subscriber: egardner.
matthiasmullie added a comment.EditedNov 29 2019, 2:35 PM

Current status: wbsetclaim fails silently, and (silently) restore the UI to the state it loaded with, in read mode.
IMO, when a change fails to submit, the widget should probably remain in edit mode, with (invalid) input untouched, and an error message.

Change 553754 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] Fix error handling when failing to submit statements

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

Change 553755 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/WikibaseMediaInfo@master] [WIP] Enable support for URL data types

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

I opened a new subtask for the specific issue of updating the FormatValue element and related logic. I have a WIP patch for it as well (still trying to figure out how to implement the changes on the PHP side): https://phabricator.wikimedia.org/T239552

Change 553755 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Enable support for URL data types

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

Ramsey-WMF closed this task as Resolved.Dec 18 2019, 10:40 PM
Ramsey-WMF added a subscriber: Ramsey-WMF.

Input for this type is working on production. However, previously added URL qualifiers for statements with "somevalue" won't show up until phase 1 of T239172 is taken care of.