Page MenuHomePhabricator

Beta feature for constraint suggestions
Closed, ResolvedPublic5 Story Points

Description

As a first step we implemented constraint suggestions only for the constraints property (Property P2302).
We would like to allow testing the suggestions also with other properties that have constraint definitions e.g. Property P31.
Therefore we would like to create a beta feature allowing users to enable constraint suggestions for all properties.

Query for all properties that have a allowed qualifiers constraint definition
http://tinyurl.com/y8sgn4j9

Query for all properties that have a one-of constraint definition
http://tinyurl.com/yd3hdeon

Tasks

  • This will need a beta feature icon.
  • This will need beta feature text description
  • Writing the code to make it a beta feature

Tech tips
This is in WikibaseQualityConstraints at https://github.com/wikimedia/mediawiki-extensions-WikibaseQualityConstraints/blob/master/modules/suggestions.js#L93

Event Timeline

Jonas triaged this task as Normal priority.Aug 24 2018, 8:55 AM
Jonas created this task.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 24 2018, 8:55 AM
Jonas updated the task description. (Show Details)Aug 27 2018, 9:57 AM
Restricted Application added a project: Design. · View Herald TranscriptAug 28 2018, 10:44 AM
Addshore set the point value for this task to 5.Aug 28 2018, 10:45 AM
Addshore moved this task from Ready to estimate to In Progress on the Wikidata-Campsite board.
Jonas updated the task description. (Show Details)Aug 28 2018, 1:17 PM

Change 455838 had a related patch set uploaded (by Jonas Kress (WMDE); owner: Jonas Kress (WMDE)):
[mediawiki/extensions/WikibaseQualityConstraints@master] Beta feature for constraint suggestions

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

Change 456124 had a related patch set uploaded (by Jonas Kress (WMDE); owner: Jonas Kress (WMDE)):
[operations/mediawiki-config@master] Enabel WBQualityConstraintsSuggestionsBetaFeature on beta

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

Jonas updated the task description. (Show Details)Aug 31 2018, 10:15 AM

I put the patch for enabling it on beta to the European Mid-day SWAT on Monday, September 03

I put the patch for enabling it on beta to the European Mid-day SWAT on Monday, September 03

I moved it to the Tuesday slot.

Change 456124 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable WBQualityConstraintsSuggestionsBetaFeature on beta

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

Change 455838 merged by jenkins-bot:
[mediawiki/extensions/WikibaseQualityConstraints@master] Beta feature for constraint suggestions

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

Addshore moved this task from incoming to in progress on the Wikidata board.Sep 17 2018, 8:20 AM

@Jonas That looks good! I just reordered the paragraphs and changed a bit of formatting.
Later when the beta feature is enabled, we should probably add a section "how to enable it", just in case someone finds the page and wants to try it.

Change 463439 had a related patch set uploaded (by Jonas Kress (WMDE); owner: Jonas Kress (WMDE)):
[operations/mediawiki-config@master] Enable WBQualityConstraintsSuggestionsBetaFeature in production

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

I added enabling the beta feature for production on the 16th
https://wikitech.wikimedia.org/wiki/Deployments#Tuesday,_October_16

Nikki added a subscriber: Nikki.EditedOct 17 2018, 12:33 PM

I just tried it with P21 and while "male" was first, "female" was the 21st suggestion, which isn't very useful (and makes us look really bad). I don't know how it currently orders them, but I think it should order them by number of uses.

P30 has a similar problem, Asia is the 4th most commonly used value yet only appears 14th after lots of other things including two fictional continents.

Yarl added a subscriber: Yarl.Oct 17 2018, 4:49 PM

I also try to figure out how this list is sorted.

Sort by use count would be perfect, but I can imagine it's not doable for performance issues.

For now I think list should respect order from property constraint, eg. https://www.wikidata.org/wiki/Property:P21#P2302. I know it's not designed to be ordered list but at least there is some control over how it's displayed. And it's the same order that is provided in action=wbgetclaims&format=json&entity=P21&property=P2302 endpoint.

For a statement with a filtered list, the references also shows the filtered list same as for the statement. For qualifiers it however shows no filtered list. When using a property with constraints as qualifier or reference, no filtering is done at all (intentionally?).

abian added a subscriber: abian.Oct 29 2018, 3:55 PM