|mediawiki/extensions/Cite : master||[WIP][POC] Adding and editing book references with Visual Editor|
|Open||None||T100645 Efficient way to refer to different pages of the same work when adding references to an article (#17)|
|Resolved||Spike||awight||T228997 Spike: Bookreferencing implementation in cite extension|
|Resolved||Spike||awight||T230920 Investigate relationship of book referencing project and parsers|
|Resolved||Spike||jkroll||T231005 Investigation: Where we would need to do changes in order to add and edit book references with the VisualEditor|
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.
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:
The reference editing dialog needs a new entry which displays the refine attribute, like here
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.