Page MenuHomePhabricator

Have the References list tool insert a References header if not present on the page
Open, Needs TriagePublic

Description

When creating adding a references list to an article, we always add a References header if it doesn't exist yet.
The References list tool should do it for us.

Current workflow:

  1. Create a References header
  2. Insert > References list (to add the References list)

Desired workflow:

  1. Insert > References list (to both create a References header if not existing and add the References list)

This is actually a feature of the wikitext editor standard toolbar on :en and :fr wikipedias:

en.png (686×476 px, 40 KB)

fr.png (702×121 px, 24 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
JTannerWMF subscribed.

Due to the team's work on Talk Pages we aren't able to prioritize this at this time

@Esanders Hi! I'm wondering as a new contributor, what development setup this task might need. Set up Visual Editor as per instructions in https://www.mediawiki.org/wiki/Extension:VisualEditor & learn how to submit a patch as per https://www.mediawiki.org/wiki/Gerrit/Tutorial#Submit_a_patch. Any other resources/getting started instructions to share here?

Change #1248931 had a related patch set uploaded (by Only_Vikas; author: Only_Vikas):

[mediawiki/extensions/Cite@master] VisualEditor: Automatically insert References header

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

thiemowmde added a project: Editing-team.
thiemowmde added subscribers: Only-Vikas, InsertMode.

Dear @Esanders, you marked this as good first task. Is your Editing-team actively watching this and supporting the volunteer at https://gerrit.wikimedia.org/r/1248931?

So I did (in 2019) - this might not be a priority for us right now, but I can provide some review and if the change seems uncontroversial we can consider deploying it.

I think this would actually make a good edit check. We could detect any reflist that doesn't immediately follow a heading and suggest one be inserted. That would allow for edge cases where there is content, and wouldn't require listing all the possible heading values in every language.

Note that on some wikis the {{reflist}} template also generates the == References == header, so we would need to not trigger when then happens.

Thank you for the architectural review, Ed. You make a fantastic point
about local-wiki variations (like 'Notes' vs 'Sources'). Trying to safely
auto-detect all of those edge cases during the insert command is too
brittle.

Moving this to the EditCheck API makes perfect sense. A pre-save warning
would be much safer and less intrusive for experienced editors. Since this
requires a completely different architectural approach, should we abandon
this patch and open a new ticket specifically for building this as a
'Missing References List' EditCheck?