Currently, the Abstract Content editor only displays the LEAD paragraph section. There is no way in the UI to add a new section for a Wikidata item, nor to choose which Wikidata item should be used as the section title.
This task is to extend the Abstract Content editor so that users can:
- Add a new section
- Select a Wikidata item to serve as that section’s title (label + Q-id)
- Edit the new section’s fragments using the existing fragment-editing UI
User story
As an editor creating or improving an Abstract Content page,
I want to add additional sections whose titles are defined by Wikidata items,
so that I can structure the abstract with multiple, well-labelled sections (e.g. "History", "Geography", etc.).
Proposed approach (high level)
- Frontend
- In the Abstract view (wl-abstract-view → wl-abstract-content), add an "Add section" area that is only shown in edit mode.
- This area should:
- Use a Wikidata entity selector to pick the section title item (Q-id).
- Show the selected item’s label and Q-id.
- Provide an "Add section" button that, when clicked, creates a new section for that Q-id in the Abstract Content data structure.
- After creation, the new section should appear in the list of sections, using:
- The Wikidata label as its displayed title.
- The existing wl-abstract-content-section component and fragment UI for editing the section value.
NB!
- This UX is to be designed and can change perhaps.
- Deletion and editing is a different ticket. [TBD]
Acceptance criteria
- In the Abstract Content editor (edit mode), there is a visible control to add a new section.
- The control lets the user search/select a Wikidata item.
- The user can only add a section when:
- A Wikidata item is selected, and
- That Q-id is not already present as an existing section.
- After clicking "Add section":
- A new section appears in the list.
- Its title shows the Wikidata label and Q-id.
- The section contains an empty (but valid) fragment list that can be edited via the existing fragment UI.
- Reloading the page after saving the Abstract Content shows the newly added section and its fragments correctly.
- Adding a new section does not break existing sections, fragment previews, or publishing.
Open questions
- Should any specific Q-ids (e.g. lede/intro) be treated specially or restricted from being added? Do we want a fixed list of allowed QIDs for sections?
Storyboard Edit
| Step 1 - try to add already existing section | Step 2 - Section already exists | Step 3 - choose 'History' | Step 4 - Add 'History' section | Step 5 - 'History' section added | Step 6 - added a fragment |
Storyboard Read
| New section visible |






