Skip to content

xfd, tag: add "desired outcome" dropdown (with delete, merge, redirect, draftify), and remove {{Merge}} tags from tag module#2345

Open
NovemLinguae wants to merge 22 commits intomasterfrom
afd-merge-3
Open

xfd, tag: add "desired outcome" dropdown (with delete, merge, redirect, draftify), and remove {{Merge}} tags from tag module#2345
NovemLinguae wants to merge 22 commits intomasterfrom
afd-merge-3

Conversation

@NovemLinguae
Copy link
Copy Markdown
Member

@NovemLinguae NovemLinguae commented Apr 13, 2026

Why

  • a recent RFC decided to bring the merging process into the AFD process

What

  • xfd module
    • add dropdown called "Desired outcome:" with options Delete, Merge, Redirect, and Draftify
    • sometimes add text box "Target page:" depending on what is chosen in the dropdown
    • for merging, when a target page is provided, add a {{Merge from}} tag to the target page
    • modifications to outputted wikicode (of the article tag and the user talk notice)
    • add tests
    • minor refactoring of some unrelated code
  • tag module
    • remove {{Merge}}, {{Merge to}}, and {{Merge from}}, since gnomes are currently manually converting all these to AFDs. will save them some work. folks need to use the new process.
  • a more detailed list of changes can be found in the ticket: xfd: add support for preferred outcome (delete, merge, redirect, draftify) at AFD #2335

Fixes #2335


New dropdown:
2026-04-11_022709

New target page input box, new default reason:
2026-04-13_051136

Warning message when target page doesn't exist (non-fatal error):
image

Why
- a recent RFC decided to bring the merging process into the AFD process, instead of placing maintenance tags and using talk pages

What
- add dropdown called "Desired outcome:" with options delete, merge, redirect, and draftify
- add |outcome= to tagging wikicode when merge, redirect, or draftify are selected
- refactor tagging wikicode to not use ternaries (more readable)

Note that Twinkle uses {{subst:Afd}} and {{subst:Afdx}}, not {{subst:Article for deletion/dated}} directly. Those two templates will need to be modified with template editor edit requests. That doesn't need to hold up this patch though.

Example wikicode outputted by this patch:

Delete:
- `{{subst:afd|help=off}}\n`
- `{{subst:afdx|18th|help=off}}\n`

Merge:
- `{{subst:afd|help=off|outcome=merging}}\n`
- `{{subst:afdx|18th|help=off|outcome=merging}}\n`

If you want the params in a different order, let me know.

Related #2335
This is a patch chain, and this patch is number 2. **Earlier patches need to merge first.** The "changed files" tab will include code from earlier patches due to GitHub limitations, until earlier patches are merged and this patch is rebased.

Why
- #2335

What
- add |outcome=draftification to {{Afd notify}} left on user's talk page
- pre-fill some draftify text in the AFD reason textarea. the specific verbiage I chose was `I propose '''draftifying''' because `. Changing away from the draftify outcome in the dropdown blanks the reason textarea.
- refactor
This is a patch chain, and this patch is number 3. **Earlier patches need to merge first.** Then rebase this one to fix the "files changed" tab.

Why
- #2335

What
- add "Target page" text box for "Redirect" option in dropdown
- add `|target=TargetPage` to {{Afd}} and {{Afdx}}
- add `|target=TargetPage` to {{Afd notify}}
- pre-fill some redirection text in the AFD reason textarea. the specific verbiage I chose was `I propose '''redirecting''' because `.

Example text written to user talk:
- `{{subst:afdx|3rd|help=off|outcome=redirecting|target=PageToRedirectTo}}`
- `{{subst:afd notice|outcome=redirecting|target=PageToRedirectTo|order=  (3rd nomination)|1=NovemTest110}} ~~~~`
Comment thread src/modules/twinklexfd.js Outdated
Comment thread src/modules/twinklexfd.js Outdated
@NovemLinguae NovemLinguae changed the title xfd: add more logic to AFD "Redirect" option xfd: add "desired outcome" dropdown, part 1 Apr 16, 2026
@NovemLinguae NovemLinguae marked this pull request as draft April 17, 2026 00:01
@NovemLinguae NovemLinguae changed the title xfd: add "desired outcome" dropdown, part 1 xfd: add "desired outcome" dropdown Apr 17, 2026
@github-actions github-actions Bot added the tests label Apr 17, 2026
@NovemLinguae NovemLinguae changed the title xfd: add "desired outcome" dropdown xfd: add "desired outcome" dropdown (with delete, merge, redirect, draftify), and remove {{Merge}} tags from tag module Apr 18, 2026
@NovemLinguae NovemLinguae changed the title xfd: add "desired outcome" dropdown (with delete, merge, redirect, draftify), and remove {{Merge}} tags from tag module xfd, tag: add "desired outcome" dropdown (with delete, merge, redirect, draftify), and remove {{Merge}} tags from tag module Apr 18, 2026
@NovemLinguae NovemLinguae marked this pull request as ready for review April 18, 2026 23:17
@NovemLinguae
Copy link
Copy Markdown
Member Author

I merged all patches together into this patch. This is ready for final review.

Comment thread src/modules/twinkletag.js Outdated
Comment thread src/modules/twinklexfd.js Outdated
Comment thread src/modules/twinklexfd.js Outdated
Comment thread tests/twinklexfd.test.js Outdated
Comment thread src/modules/twinklexfd.js Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

xfd: add support for preferred outcome (delete, merge, redirect, draftify) at AFD

2 participants