Page MenuHomePhabricator

Allow duplicating references in VisualEditor without re-using them
Open, Needs TriagePublicFeature

Description

Feature summary:
Add a duplicate feature to references in VisualEditor.

obraz.png (311×613 px, 74 KB)

(new action is drawn in red-orange; doesn't mean that color should actually be red-orange though :))

Proposed workflow:

  1. Edit an article using VisualEditor
  2. Click on any reference
  3. Click on a new "Duplicate" action
  4. If you selected <ref name="abc"/> it would create a new ref with some new name: <ref name=":1">...content of name=abc...</ref>

Use case(s):

  • Use an existing reference as a "template" for creating a new one (e.g. when a user want's to re-use certain formatting styles)
  • Use an existing reference to create a similar (but not identical) reference, e.g. different edition or page number

Currently to duplicate a reference you have to:

  1. Open another browser tab with a 2nd article.
  2. VE-Edit the 2nd article.
  3. Go back to original, 1st article.
  4. Copy from 1st to 2nd.
  5. Copy back from 2nd to 1st.

Current procedure is very hard to discover and even then it takes some setup to execute...

Benefits:

  • Changing only one instance of a re-used reference in VisualEditor is not possible currently (except when using the workaround described above)
  • Duplicating references in VisualEditor could be much easier (and much, much more discoverable)
  • Implementing a duplication feature will make referencing workflows easier for VisualEditor-users

Other information:
Sub-referencing implemented a feature to address this need: T406461: VE: Enable user to make a choice to edit all sub-ref or only one. (and T406454)

Event Timeline

Thanks a lot for the detailed suggestion. Very much appreciated. We are actually considering pretty much exactly this as part of our ongoing WMDE-References-FocusArea (literally "make re-using references easier", see https://meta.wikimedia.org/wiki/WMDE_Technical_Wishes/Reusing_references). Our WMDE-Design team lead by @ElineWMDE is currently exploring some options. We cannot promise anything yet, though.

Yes, T239337 and T212609 can probably be considered duplicates. Personally I'm in favor of closing the other ones in favor of the more detailed ticket here.

Some chatter in T164954 that may be interesting.

Noting that we've implemented a feature for sub-referencing last year to address this need: T406461: VE: Enable user to make a choice to edit all sub-ref or only one.. Users can copy and paste a sub-reference (or use the re-use dialog) and decide whether to change all instances of the re-used sub-reference or just the one they're currently editing. The same mechanism also exists for adding sub-reference details to re-used references: T406454: VE: Enable user to make a choice to add a sub-ref to all or only one main ref.

I will update the task description to reflect that the issue has been resolved for sub-referencing. And I'll merge the tickets mentioned in T372785#10084007 into this ticket – they are older but this ticket provides a more detailed description of the problem (and the potential solution).