Page MenuHomePhabricator

[Task] Diff for unit changes
Closed, ResolvedPublic

Description

[WE] I want to see the label of the unit item instead of just the URL.

It should look like this:

  • Amount: 3,000 kilometer
  • Upper bound: 3,010 kilometer
  • Lower bound: 2,990 kilometer
  • Unit: kilometer

Event Timeline

Jonas raised the priority of this task from to Normal.
Jonas updated the task description. (Show Details)
Lydia_Pintscher renamed this task from Diff for unit changes to [Task] Diff for unit changes.Aug 17 2015, 1:21 PM
Lydia_Pintscher set Security to None.
Lydia_Pintscher moved this task from incoming to monitoring on the Wikidata board.
Lydia_Pintscher moved this task from monitoring to consider for next sprint on the Wikidata board.
thiemowmde closed this task as Invalid.Aug 18 2015, 1:19 PM
thiemowmde claimed this task.
thiemowmde added a subscriber: thiemowmde.

This is already done by applying a UnitFormatter with a LabelDescriptionLookup. The "problem" is that this lookup is not a Wikidata.org lookup but one in your local repository. We agreed that this is enough for what we need on Wikidata.org now. Can be improved later.

Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptAug 18 2015, 1:19 PM
Lydia_Pintscher reopened this task as Open.Aug 31 2015, 3:05 PM
Lydia_Pintscher added a subscriber: Lydia_Pintscher.

Reopening this as it is still showing a URI here: http://wikidata.beta.wmflabs.org/w/index.php?title=Q23950&diff=217186&oldid=43001 And since this is using local URIs I would assume those are treated as they'd be on Wikidata itself.

Showing only the label is not good, because it's ambiguous. This is not just a theoretical problem, but rather nasty in practice: There are a lot of units that have the same name but are slightly different - or also refer to something of a similar name.

For example, imagine someone picked "pint" as a unit. They wanted Q11123, but they accidentally picked Q20429. Someone notices this and fixes the mistake. What does the diff of that edit look like? If we just show the label, the edit is invisible, because both items have the same label ("pint"). That's not good at all...

Showing the label in the diff helps, but we need to show it along with the Q-id or URI, or at least the description. Otherwise it's ambiguous and may lead to confusion.

aude added a subscriber: aude.Aug 31 2015, 4:49 PM

something like "metre (Q11573)" would be good

So it would look like this?

Amount 3,000 kilometer
Upper bound 3,010 kilometer
Lower bound 2,990 kilometer
Unit kilometer (Q72067)

Or much simpler:

  • Amount: 3,000 kilometer
  • Upper bound: 3,010 kilometer
  • Lower bound: 2,990 kilometer
  • Unit: kilometer

Or much simpler:

  • Amount: 3,000 kilometer
  • Upper bound: 3,010 kilometer
  • Lower bound: 2,990 kilometer
  • Unit: kilometer

If you're taking that approach, you should probably also include an indicator of the level of significance of the upper/lower bounds.

In T108808#1592066, @Mike_Peel wrote, in part:

If you're taking that approach, you should probably also include an indicator of the level of significance of the upper/lower bounds.

I think the upper and lower bounds were created from the input to the user interface or API. The upper bound would be the nominal value plus the uncertainty, and the lower bound would be the nominal value minus the uncertainty. According to the data model (https://www.mediawiki.org/wiki/Wikibase/DataModel#Quantities) the quantity is stored in the data base as three numbers, the amount, the upper bound, and the lower bound. In this simple-minded model, the upper and lower bounds would be exact, absolute limits. (But in real life most quantities with a well-studied uncertainty will be points on the normal distribution, often plus or minus two or three standard deviations.)

@Mike_Peel wrote:

include an indicator of the level of significance of the upper/lower bounds.

What does this mean? Include what? Include where? I do not think there is anything missing in the diff view.

In T108808#1592509, @Jc3s5h wrote:, in part:

(But in real life most quantities with a well-studied uncertainty will be points on the normal distribution, often plus or minus two or three standard deviations.)

That's my point - you need to be clear whether the uncertainties are 1/2/3/more/less standard deviations, as these do differ between references and fields of work. (Leaving aside issues of non-Gaussianity/non-normal distributions etc.)

Guys, you are just starting a Wikibase-DataModel discussion completely unrelated to this task, which is about what is shown in diff views. Your comments will not be read here. Please focus and create a new [RFC] task if you want to suggest changes to the underlying data model. Thank you very much.

Izno added a comment.Sep 1 2015, 1:27 PM
This comment was removed by Izno.

Guys, you are just starting a Wikibase-DataModel discussion completely unrelated to this task, which is about what is shown in diff views. Your comments will not be read here. Please focus and create a new [RFC] task if you want to suggest changes to the underlying data model. Thank you very much.

OK, sorry - I didn't realise that this was a more fundamental issue about the data model! I thought it was just being omitted from the discussion here. I'll raise it as a different ticket after doing a bit of background reading.

Now raised at T111111. Apologies again for the unrelated discussion!

Decision: We'll go with the linked version Thiemo proposes. That is most consistent with what we do already, isn't too in-your-face and still gives people the option of seeing which unit is meant exactly. So we will show the label and link it to the item.

Jonas updated the task description. (Show Details)Sep 2 2015, 3:24 PM
Jonas moved this task from ready to go to in progress on the Wikidata board.
Jonas moved this task from Backlog to Doing on the Wikidata-Sprint-2015-09-01 board.

Change 236510 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Use mocks in QuantityDetailsFormatterTest

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

Change 236510 merged by jenkins-bot:
Use mocks in QuantityDetailsFormatterTest

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

Change 236512 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Fix double-escaping issue in QuantityDetailsFormatter

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

Change 236515 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Format unit as a link in QuantityDetailsFormatter, if possible

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

Change 236512 merged by jenkins-bot:
Fix double-escaping issue in QuantityDetailsFormatter

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

Change 236515 merged by jenkins-bot:
Format unit as a link in QuantityDetailsFormatter, if possible

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

daniel moved this task from Doing to Done on the Wikidata-Sprint-2015-09-01 board.Sep 7 2015, 1:28 PM