Page MenuHomePhabricator

VE: Enable user to make a choice to add a sub-ref to all or only one main ref
Closed, ResolvedPublic

Description

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

Figma file

image.png (447×506 px, 42 KB)

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

Details

Event Timeline

Moving to pickup so that devs can work on creating the technical implementation sub-tasks

Lina_Farid_WMDE renamed this task from VE: Allow user to decide whether to add a sub-ref to all occurrences of a main ref or not. to VE: Enable user to make a choice to add a sub-ref to all or only one main ref.Oct 12 2025, 2:14 PM

Change #1201018 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] [WIP] Allow adding details to all main refs

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

Change #1201018 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Allow adding details to all main refs

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