Background: Some logged-in editors will want to stop seeing the event discovery dialog once they know what it is. This task gives them a straightforward path: we add a new global preference on Special:Preferences > User profile > Event discovery. They will have the option to show/hide the post-edit dialog that promotes events. They will learn about this preference because, in the post-edit dialog, there will be a message with a link to Preferences: "You can hide this message in the future by going to your user preferences"
Type of story
- Front End
- Backend
Acceptance criteria
- User preferences: New global opt-out campaignevents-opt-out-event-discovery with default off (dialogs allowed); toggle + section copy on Special:Preferences under User profile ("Event discovery"), same registration style as other CampaignEvents preferences.
- Event discovery will be the rename of the currently named "Invitation lists" section
- Dialog: A link is added on the Event Discovery Dialog that goes to "User Preferences";
- Global suppression: If the opt-out is true, for any event, do not record a discovery promotion and do not show the modal — since user has said they do not want see this type of modal anymore.
- Turning the preference off again in Special:Preferences restores normal behaviour (task-13 may signal when all other conditions match).
Design
| Hide message in post-edit popup | User preferences |
Messages and copy included
- For happy path:
- Message key: campaignevents-eventdiscovery-dialog-hide-in-preferences
- Message text: "You can hide this message in the future by going to your user preferences."
- Context: Full text of the link on the Event Discovery Dialog; entire string links to Special:Preferences
- Message key: campaignevents-eventdiscovery-preference-label
- Message text: "After I publish an edit, notify me about relevant events."
- Context: Toggle label on Special:Preferences for the opt-out preference
- Message key: prefs-campaignevents-event-discovery
- Message text: "Event discovery"
- Context: Section header on Special:Preferences for that group
- Message key: campaignevents-eventdiscovery-dialog-hide-in-preferences
- For unhappy path: NOT NEEDED
Depends on
- task-13 (Event Discovery Dialog and promotion post-save path must exist before patches 2 and 3)
Testing required?
- Yes
- Patch 1: preference appears, default correct, save toggles value.
- Patch 2: link text + href to Special:Preferences.
- Patch 3: with opt-out true, edits on worklist pages for two different events → no promotion row and no signal; with opt-out false, happy path from task-13 works again.
Split patches suggestion
- Patch 1: new opt-out in user preferences only (defaults + Special:Preferences UI).
- Patch 2: link on the Event Discovery Dialog + i18n for campaignevents-eventdiscovery-dialog-hide-in-preferences (Special:Preferences strings stay with patch 1).
- Patch 3: post-save guard only — global opt-out stops promotion + modal signal for every event.
Gherkin scenarios
Feature: Event discovery global opt-out
- Scenario: Preferences link on the dialog
- Given the Event Discovery Dialog is open for a logged-in user
- Then a link is shown whose text matches the hide-in-preferences message
- And "Visit event page" and "Skip" remain available
- Scenario: Link opens Special:Preferences
- Given the Event Discovery Dialog is open for a logged-in user
- When the user follows that link
- Then the user reaches Special:Preferences
- Scenario: Global opt-out blocks dialog for any event
- Given user "Carol" is logged in
- And Carol has turned on the global event-discovery opt-out in Special:Preferences
- And Carol is not a registered participant of event E1
- And Carol is not a registered participant of event E2
- When Carol saves a worklist article for event E1
- Then no discovery promotion is recorded for that save
- And no modal signal is sent for that save
- When Carol saves a worklist article for event E2
- Then no discovery promotion is recorded for that save
- And no modal signal is sent for that save
- Scenario: Turning preference off restores discovery when task-13 would signal
- Given user "Carol" is logged in
- And Carol previously had the global event-discovery opt-out on
- And Carol has turned off the global event-discovery opt-out in Special:Preferences
- When Carol makes a save that satisfies task-13's happy-path conditions
- Then the Event Discovery Dialog can appear again


