Page MenuHomePhabricator

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

Description

Story

As an editor using VisualEditor,
I want to update all occurrences of a re-used sub-reference,
so that I don’t have to manually edit the sub-reference one at a time.

Design

See Figma file
No need to change the link text to "Learn more". Keep as in the current version.

Screenshot From 2025-10-12 15-47-43.png (703×843 px, 131 KB)

Acceptance Criteria

Checkbox default: checked
Given a sub-reference is used more than once in the article
When I edit the sub-reference (via the footnote in the text)
Then a selected checkbox is shown with the copy ‘Edit all (n) uses of these details.’

Don’t show checkbox
Given a sub-ref is not re-used in the article
When I edit the sub-reference (via the footnote in the text)
Then I do not see a checkbox

Modify all occurrences
Given I am editing an existing re-used sub-reference (via the footnote in the text)
When I keep the checkbox selected and press ‘insert’
Then all the footnote markers get the new modifications AND the reference list shows the changes with re-use markers as backlinks.

Add only to this footnote marker (sub-reference)
Given am editing an existing re-used sub-reference (via the footnote in the text)
When I unselect the checkbox and press ‘insert’
Then only the footnote marker I am editing is updated AND the reference list shows a new sub-ref without re-use markers

Technical implementation

  • display checkbox only for editing subrefs (not for main ref and not for adding subrefs)
  • select checkbox by default
  • get and display number of similar subrefs
  • update all other occurrences if checkbox is selected
  • keep current behavior (only update this subref) if checkbox is not selected

For review

To test the change you need to create a reuse in VE by copy pasting an existing subref. Then edit one of the now connected subrefs. You should see the checkbox there. The connection between the subrefs is currently only existing during the edit process. The ticket T406467 will implement that this also stays when the page is saved.

Event Timeline

Lina_Farid_WMDE renamed this task from VE: Allow user to decide whether to update all occurrences of a sub-ref ref or not. to VE: Enable user to make a choice to edit all sub-ref or only one..Oct 12 2025, 2:02 PM
Lina_Farid_WMDE updated the task description. (Show Details)

Change #1199022 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/Cite@master] [WIP] Adding a checkbox to edit all similar subrefs

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

Change #1199022 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Adding a checkbox to edit all similar subrefs

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