Page MenuHomePhabricator

When edit sub-reference details, the "replace citation" button doesn't replace the entire citation using the automatic / manual tab
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue:

  • Edit an article with sub-references in VisualEditor
  • Edit sub-reference details and use the "replace citation" button
  • Select the automatic / manual tab and enter any content

What happens?:

What should have happened instead?:

Other information:

Event Timeline

thiemowmde subscribed.

I'm not sure I understand the issue. When I'm specifically editing the sub-ref, why shouldn't the replace button replace the sub-ref? As far as I'm concerned it works entirely as expected at the moment.

I'm not sure I understand the issue. When I'm specifically editing the sub-ref, why shouldn't the replace button replace the sub-ref? As far as I'm concerned it works entirely as expected at the moment.

"Replace citation" should always replace the entire citation, otherwise the button should be called "replace details". And if it was supposed to replace sub-ref details only the behaviour would still be wrong – in that case for the re-use tab. Currently two options replace details while the third one replaces the entire citation - the behaviour should be identical for all tabs. Noting that "replace citation" -> "re-use" -> main reference is currently the only way to remove ref details in VE, therefore the re-use tab is the intended behaviour.

Agreed with Johannes: When hitting the 'Replace citation' button, the user likely expects to replace the whole citation. It makes no sense trying to insert an automatic ref or CS1-templated ref into the subref section of a reference, since those are only suitable for main refs.
So when pressing the 'Replace citation' button from the Details Dialog, the whole reference should be replaced, not only the sub-ref section of the dialog.

Import thing to consider for later though: Currently, this button can also be used to get to the 'Basic' Reference Dialog for references where the Template Dialog is automatically opened. If we ever support preconfigured templates in the sub-ref section, we would need a different workflow to access the 'Basic' Details Dialog.

We talked about this in a larger round and decided to do this in two steps:

  1. We change the button so it replaces the entire ref, as discussed above.
  2. Later we will learn if and which edge cases exist for replacing only the sub-ref and how to solve these problems. This is out of scope for this ticket here.

Bug triage:

  • Technically clear to solve.