Page MenuHomePhabricator

Investigation: Where we would need to do changes in order to add and edit book references with the VisualEditor
Closed, ResolvedPublic5 Estimated Story PointsSpike

Event Timeline

Change 532682 had a related patch set uploaded (by Jkroll; owner: Jkroll):
[mediawiki/extensions/Cite@master] [WiP] Adding and editing book references with Visual Editor

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

@jkroll I think this task inherited its parent's story point estimate, accidentally. If true, let's re-estimate?

There's a specific piece of information we need for the parent task, which is to look at the minimum patch which would allow us to handle references with the refines attribute, but without rendering or making it editable. This would be for the purpose of having a partial-rollback strategy in case the hierarchical subreferences end up being problematic.

awight changed the point value for this task from 13 to 5.Sep 3 2019, 12:19 PM

Making a guess about remaining story points.

Tobi_WMDE_SW added a subscriber: Tobi_WMDE_SW.

@jkroll please sum up the investigation results so far here

To display the reference links, CSS counters are used in the existing code. To add the refines, we would probably add another counter and data attribute, like so:
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Cite/+/532682/5/modules/ext.cite.style.css

The reference editing dialog needs a new entry which displays the refine attribute, like here
https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Cite/+/532682/5/modules/ve-cite/ve.ui.MWReferenceDialog.js
This also needs to save the refine attribute, and probably we should have a combobox which allows to select existing refines. This could be modeled after MWReferenceSearchWidget and related widgets.

The refines attribute itself is passed through to MWReferenceModel.refinesKey. The reference indices itself would have to be calculated similar to https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Cite/+/530399/5/includes/Cite.php

Currently VE shows a warning when the Wikitext contains a reference which is used several times, but I don't see a way to actually select the reference in the editor popup, ie. change the name attribute of the reference. Maybe we could add this while we're at it.

Change 532682 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/Cite@master] [WIP][POC] Adding and editing book references with Visual Editor

Reason:

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