Last modified: 2014-03-19 11:14: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 T58684, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56684 - DataValues shown in diffs should use some kind of "raw" format
DataValues shown in diffs should use some kind of "raw" format
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on: 57741 57742
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-06 19:23 UTC by Daniel Kinzler
Modified: 2014-03-19 11:14 UTC (History)
3 users (show)

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


Attachments

Description Daniel Kinzler 2013-11-06 19:23:26 UTC
Some DataValue sublcasses use "hidden" or "secondary" values to augment the primary value, e.g. the globe URI in GlobeCoordinates or the upper- and lower bound in QuantityValues. Some of these may not be shown by the default formatter for that kind of data value.

However, in diffs, we need to see *all* data that may have changed. So, there should be a flag like "RAW_FORMAT" or some such passed via FormatterOptions causing the formatters to generate a more detailed output (in some cases, it may even be sensible to have a separate formatter class for this purpose).
Comment 1 Daniel Kinzler 2013-11-13 16:40:16 UTC
Summary of team discussion:

* Use HTML renderer in diffs, to have more control over output.
** Possibly, at some point, highlight the bits of the value that actually changed

* Simple types (string, url, commonsMedia) are unproblematic and stay as they are.

* Complex values (e.g. time, coordinates, and quantities) are shown as itemized lists of their parts.

* Item (reference) values are "expanded" to:
** show at least the referenced item ID
** if possible a label in the user's language (fallback applies). 
** the value is linked to the target item. 
** we may want to show the target item's description, also.

* Numbers are localized (wrt the decimal separator, etc)
* Numbers are not rounded (and no unit conversion is applied)

* A TimeValue's timestamp is shown in full precision. 
** we may use raw ISO format for now
** localized time values would be nice
** applying user preferences for time formatting would cause caching issues

* A TimeValue's precision should be translated from the numeric form to a localized form ("hour", "day", "millennium", etc).
* A TimeValue's before/after parts should include the precision name (e.g. "before: 3 years".


Suggested breakdown:
* Inject a ValueFormatterFactory into the DiffView, so we can provide specialized formatters for use in diffs.
* Implement a diff formatter for WikibaseItem
* Implement a diff formatter for TimeValue
* Implement a diff formatter for GlobeCoordinateValue
* Implement a diff formatter for QuantityValue
Comment 2 Gerrit Notification Bot 2013-11-28 17:41:35 UTC
Change 98110 had a related patch set uploaded by Daniel Kinzler:
(bug 56684) Use HTML formatters in diffs.

https://gerrit.wikimedia.org/r/98110
Comment 3 Gerrit Notification Bot 2013-11-28 20:04:49 UTC
Change 98124 had a related patch set uploaded by Daniel Kinzler:
(bug 56684) Show Quantity details in diff.

https://gerrit.wikimedia.org/r/98124
Comment 4 Gerrit Notification Bot 2013-12-02 11:30:26 UTC
Change 98110 merged by jenkins-bot:
(bug 56684) Use HTML formatters in diffs.

https://gerrit.wikimedia.org/r/98110
Comment 5 Gerrit Notification Bot 2013-12-02 12:10:51 UTC
Change 98124 merged by jenkins-bot:
(bug 56684) Show Quantity details in diff.

https://gerrit.wikimedia.org/r/98124
Comment 6 Daniel Kinzler 2014-02-07 22:12:58 UTC
Status update: Quantities now show with all details in diffs, but we still need to do the same for the Time and Geo types. Now that this infrastructure is in place, this should be quite simple.

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


Navigation
Links