Last modified: 2014-10-14 17:37:52 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 T71474, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 69474 - VisualEditor: Reference & cite tooltips should show content snippets, instead of generic labels
VisualEditor: Reference & cite tooltips should show content snippets, instead...
Status: ASSIGNED
Product: VisualEditor
Classification: Unclassified
ContentEditable (Other open bugs)
unspecified
All All
: High enhancement
: VE-deploy-nextup
Assigned To: Editing team bugs – take if you're interested!
:
: 69744 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-13 14:26 UTC by Ed Sanders
Modified: 2014-10-14 17:37 UTC (History)
7 users (show)

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


Attachments

Description Ed Sanders 2014-08-13 14:26:22 UTC
For citation template references we may also want to specify a subset of parameters to show first.
Comment 1 Ed Sanders 2014-08-19 16:00:25 UTC
*** Bug 69744 has been marked as a duplicate of this bug. ***
Comment 2 Ed Sanders 2014-08-19 16:01:20 UTC
We could list template values in order until we run out of room, but this may not lead to desirable results, for example the first parameter in {{Cite web}} is URL.

A more complex solution would be to come up with a format for defining how to generate the summary of a template and store it in template data, either as a value on the column (summary order):

Field     Desc  Summary order
url       ...   null
publisher ...   2
title     ...   1
date      ...   3
month     ...   null

A simplified version of this would just flag one field as being used in the summary.

etc.

Or as a string concatenation message somewhere:

"{{{title}}}, {{{publisher}}} - {{{date}}}"
Comment 3 James Forrester 2014-08-19 22:27:33 UTC
I think we'd much rather keep the current model of showing the name of something shown, or the value of something not shown (like for HTML comments)…
Comment 4 Bartosz Dziewoński 2014-09-17 12:14:18 UTC
Any attempt to "parse" the template parameters is going to become very complex or fail to address the needs of wikis other than the English Wikipedia. How about just displaying the parsed content of the reference, stripped of links and any block markup, and limited to some length?
Comment 5 Bartosz Dziewoński 2014-09-17 13:50:21 UTC
I played with it and the following sort of works for all reference node types. There must be a better way to do it, but I can't find one. (It also doesn't update the tooltip after reference contents are changed, probably because that is done deferred or something.)

ve.ce.MWReferenceNode.static.getDescription = function ( model ) {
  var refModel = ve.dm.MWReferenceModel.static.newFromReferenceNode( model );
  var surface = ve.init.target.createSurface( refModel.getDocument() );
  var text = $( surface.getView().$element ).text();
  surface.destroy();
  return text;
};
Comment 6 Bartosz Dziewoński 2014-09-27 00:14:40 UTC
(I tried messing around with ve.dm.Converter too, but it seems impossible to render the contents of templated references without involving the surface, probably because they're magically generated in ve.ce.)
Comment 7 Roan Kattouw 2014-09-27 00:31:52 UTC
(In reply to Bartosz Dziewoński from comment #6)
> (I tried messing around with ve.dm.Converter too, but it seems impossible to
> render the contents of templated references without involving the surface,
> probably because they're magically generated in ve.ce.)

Yeah, this needs CE. I think we may have to rethink how we do descriptions a little.

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


Navigation
Links