Skip to content

Commit

Permalink
speedy: New option for sysops: notify creator upon deletion
Browse files Browse the repository at this point in the history
Closes wikimedia-gadgets#520 and wikimedia-gadgets#505.  Removes the old "open talk page" sysop option and folds the non-sysop tagging system into a unified `noteToCreator` notification system for both tagfing and deleting.  Uses the existing system for tagging to determine whether or not to notify, rather than the bespoke option for `openUserTalk` from wikimedia-gadgets#300; that is, it will notify only if the corresponding box is checked AND (at least one of) the CSD in question is checked in the user preferences.

The box is checked by default, unless it finds `$('#delete-reason')` on the page, indicating some sort of XfD or CSD or the like; in the latter scenario, if the box is subsequently checked, there is an additional prompt (this might be a good candidate for removal down the line, but I think it's important to include now, especially since it's a new feature).  It uses the existing preference about whether to welcome the user alongside the notification rather than create a separate one just for post-deletion notifications.

New templates all listed at [[Template:Speedy deletion deleted]].
  • Loading branch information
Amorymeltzer committed May 28, 2019
1 parent bb430cb commit 13ebf0e
Show file tree
Hide file tree
Showing 3 changed files with 140 additions and 172 deletions.
43 changes: 22 additions & 21 deletions modules/twinkleconfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ Twinkle.config.sections = [
},

// TwinkleConfig.watchSpeedyPages (array)
// Whether to add speedy tagged pages to watchlist
// Whether to add speedy tagged or deleted pages to watchlist
{
name: "watchSpeedyPages",
label: "Add page to watchlist when tagging with these criteria",
label: "Add page to watchlist when using these criteria",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteria,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaDisplayOrder
Expand All @@ -414,24 +414,36 @@ Twinkle.config.sections = [
type: "boolean"
},

// TwinkleConfig.welcomeUserOnSpeedyDeletionNotification (array of strings)
// On what types of speedy deletion notifications shall the user be welcomed
// with a "firstarticle" notice if their talk page has not yet been created.
{
name: "welcomeUserOnSpeedyDeletionNotification",
label: "Welcome page creator when notifying with these criteria",
helptip: "The welcome is issued only if the user is notified about the deletion, and only if their talk page does not already exist. The template used is {{firstarticle}}.",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteriaNotification,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaNotificationDisplayOrder
},

// TwinkleConfig.notifyUserOnSpeedyDeletionNomination (array)
// What types of actions should result that the author of the page being notified of nomination
// What types of actions should result in the author of the page being notified of nomination
{
name: "notifyUserOnSpeedyDeletionNomination",
label: "Notify page creator only when tagging with these criteria",
label: "Notify page creator when tagging with these criteria",
helptip: "Even if you choose to notify from the CSD screen, the notification will only take place for those criteria selected here.",
type: "set",
setValues: Twinkle.config.commonSets.csdCriteriaNotification,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaNotificationDisplayOrder
},

// TwinkleConfig.welcomeUserOnSpeedyDeletionNotification (array of strings)
// On what types of speedy deletion notifications shall the user be welcomed
// with a "firstarticle" notice if his talk page has not yet been created.
// TwinkleConfig.warnUserOnSpeedyDelete (array)
// What types of actions should result in the author of the page being notified of speedy deletion (admin only)
{
name: "welcomeUserOnSpeedyDeletionNotification",
label: "Welcome page creator alongside notification when tagging with these criteria",
helptip: "The welcome is issued only if the user is notified about the deletion, and only if their talk page does not already exist. The template used is {{firstarticle}}.",
name: "warnUserOnSpeedyDelete",
label: "Notify page creator when deleting under these criteria",
helptip: "Even if you choose to notify from the CSD screen, the notification will only take place for those criteria selected here.",
adminOnly: true,
type: "set",
setValues: Twinkle.config.commonSets.csdCriteriaNotification,
setDisplayOrder: Twinkle.config.commonSets.csdCriteriaNotificationDisplayOrder
Expand All @@ -447,17 +459,6 @@ Twinkle.config.sections = [
setDisplayOrder: Twinkle.config.commonSets.csdAndDICriteriaDisplayOrder
},

// TwinkleConfig.openUserTalkPageOnSpeedyDelete (array of strings)
// What types of actions that should result user talk page to be opened when speedily deleting (admin only)
{
name: "openUserTalkPageOnSpeedyDelete",
label: "Open user talk page when deleting under these criteria",
adminOnly: true,
type: "set",
setValues: Twinkle.config.commonSets.csdAndDICriteria,
setDisplayOrder: Twinkle.config.commonSets.csdAndDICriteriaDisplayOrder
},

// TwinkleConfig.deleteTalkPageOnDelete (boolean)
// If talk page if exists should also be deleted (CSD G8) when spedying a page (admin only)
{
Expand Down

0 comments on commit 13ebf0e

Please sign in to comment.