Story
As an (experienced) editor using VisualEditor,
I want to create a sub-ref and attach it to all occurrences of the main ref,
so that I don’t have to manually add the sub-reference multiple times.
Design
Acceptance Criteria
Checkbox default: unchecked
Given a main reference is used more than once in the article
When I add a new sub-reference
Then an unselected checkbox is shown with the copy ‘Add these details to all (n) uses of this reference that don’t have details yet.’
Add to all occurrences
Given I am creating a new sub-reference for a reused main ref
When I select the checkbox and press ‘insert’
Then all the footnote markers turn to the same number [n.n] AND the reference list shows a new sub-ref with re-use markers as backlinks.
Add only to this footnote marker
Given I am creating a new sub-reference for a reused main ref
When I keep the checkbox unselected and press ‘insert’
Then only the footnote marker I am editing turns to [n.n] AND the reference list shows a new sub-ref with re-use without re-use markers
Edge case, should aslo be covered
Given A reference is used >2 times and only one has a sub-referene
When I select that main ref that has no sub-ref and enter an identical detail
Then the identical sub-ref is merged in the reference list and re-use markers are available (a,b)
Technical implementation
- display this checkbox only for adding a subref (not for main ref and not for editing subrefs)
- unselect checkbox by default
- keep current behavior (add new subref only to this reference) if checkbox is unselected
- add to all occurences if checkbox is selected
