Context
- Implement incrementally so that we could use either status on the beta wiki for user testing.
- This user flow is very basic and we're intending its roll out to the first pilot wikis. We will iterate upon it later.
- Sub-referencing emerges only when a first reuse exists of the main ref. The button "add details" shows up only when a reuse takes place or exists already.
- Scope of this ticket is for Parsoid (legacy Parser does not need implementation)
- Wikitext is consistent
- Should be fixed as a followup: T391656: VE: template selection dialog blocked by 'Add details to reference'
User story
As a user using VE,
I want to add more details to an existing main reference
so that my citation becomes more detailed and specific for readers
Acceptance Criteria
GIVEN I am in VE and have a main reference that is reused in the article
WHEN I click (or use key strokes) on a foot note marker of a main reference
THEN I see an add details button in the context item AND I see how often it is reused
GIVEN I see the context item with the details button
WHEN I click on the details button
THEN I am presented with a dialog to add details
GIVEN I opened the details dialog
WHEN I enter a detail into the free form (or use a template to do so)
THEN I see the static preview displaying the main ref and the details I've entered
GIVEN I've entered the details in the dialog
WHEN I click on Insert / Apply Changes
THEN The selected footnote marker [n] is changed to [n.n] and I see the detail organised hierarchical in the reference list AND I see the context Item with two edit buttons, one for the main and one for the detail AND the other reuses stay as [n].
Further acceptance criteria:
- basic accessibility controls for navigating and entering details
- VE will need to add an automatic name to unnamed main refs.
- The chip with the reuse information is shown when the main ref is reused.


