Background: This task applies only to logged-in users who are not registered participants of the event in question. For that audience, the promotion post-edit modal must be shown only if it has not already been shown for that user and that event.
We intend to implement the post-edit dialog as an approximately 2-4 week experiment, but then we may remove it so we can assess impact.
Type of story
- Backend / Front End
Acceptance criteria
- Anonymous editors are skipped: no promotion is recorded, no signal for the promotion post-edit modal.
- Registered participants of that event are skipped: this task does not apply to them.
- There will be no minimum threshold for the post-edit dialog
- This is due to potential performance issues if we implement a threshold
- Users who have globally opted out of event discovery in their preferences are skipped (Task TDB): no promotion recorded, no signal for the promotion post-edit modal.
- Users for whom the promotion post-edit modal has already been shown for this specific event are skipped: no duplicate promotion , no modal signal.
- For logged-in users who are not registered participants of that event, when they edit an article and the modal has not yet been shown for that user and event: the system records that promotion once for that user and event, the frontend receives a signal, and the promotion post-edit modal is shown with “Visit event page” and “Skip”.
- The dialog appears only when the backend signals it; “Visit event page” opens the EventDetails page for the event in a new tab; “Skip” dismisses the dialog.
- We will use any article from the worklist for the post-edit dialog (i.e., it does not matter if it was added by event organizer, participant, or general editor)
Design
| One event to promote | More than one event to promote |
Truncation of event name if it is too long and doesn't fit in one line:
Messages and copy included
One event to promote
- For happy path:
- Message key: campaignevents-eventdiscovery-dialog-title
- Message text: Your edit connects to a larger effort
- Context: title of the event discovery dialog (promotion post-edit modal; frontend patch)
- Message key: campaignevents-eventdiscovery-dialog-description
- Message text: This article will be improved as part of {Event}. Join this event to help make an impact and connect with other editors.
- Context: description of the event discovery dialog (promotion post-edit modal; frontend patch)
- Message key: campaignevents-eventdiscovery-dialog-visit-button
- Message text: Visit event page
- Context: primary action button in the event discovery dialog; opens the EventDetails page in a new tab
- Message key: campaignevents-eventdiscovery-dialog-title
More than one event to promote
- For happy path:
- Message key: TBD
- Message text: Your edit connects to a larger effort.
- Context: title of the event discovery dialog (promotion post-edit modal; frontend patch)
- Message key: TBD
- Message text: This article will be improved as part of $Number active events. Tap one to learn more.
- Context: description of the event discovery dialog if we are promoting more than one event.
- Message key: TBD
- "Never show again" and preference copy are owned by task-15.
Depends on
- (discovery promotion store — “already promoted?” checks and recording a promotion once)
- T423332 (Add DB layer for ce_worklist_articles)
- T423606 (Feature flag)
Testing required?
- Yes
- Minimum testing: unit tests covering every skip condition and the happy path:
- anonymous user → skipped
- registered participant of that event → skipped (outside this task’s audience)
- globally opted-out user → skipped, tested only on task 15
- user for whom the promotion post-edit modal was already shown for this event → skipped
- eligible logged-in non-participant (first qualifying edit on a worklist article for this event) → promotion recorded, modal signal sent, dialog shown with correct actions
- Tested end-to-end in: this task and task 15
Split patches suggestion
- Patch 1 (backend): logged-in non-participant post-save branch + promotion persistence + unit tests covering all skip conditions and the happy path signal (Storage TDB)
- Patch 2 (frontend): Event Discovery Dialog + i18n for title / visit / skip + resource wiring to consume the signal from patch 1
Gherkin scenarios
Feature: Post-save — promotion post-edit modal (logged-in, not a participant of that event)
- Scenario: Logged-in non-participant edits a worklist article for the first time — promotion recorded and modal signalled
- Given an ongoing campaign event with contributions enabled
- And the event worklist contains article "Main Page" (namespace 0)
- And user "Carol" is logged in
- And Carol is not a registered participant of that event
- And Carol has not opted out of event discovery
- And the promotion post-edit modal has not been shown to Carol for this event before
- When Carol edits and saves "Main Page"
- Then a promotion record is created for Carol and the event
- And the frontend receives a signal to show the promotion post-edit modal
- And the promotion post-edit modal is displayed to Carol
- Scenario: Same user edits the same event's worklist article again — no duplicate promotion, no modal
- Given an ongoing campaign event with contributions enabled
- And the event worklist contains article "Main Page"
- And user "Carol" is logged in
- And Carol is not a registered participant of that event
- And Carol has not opted out of event discovery
- And the promotion post-edit modal has already been shown to Carol for this event
- When Carol edits and saves "Main Page" again
- Then no additional promotion record is created
- And the frontend does not receive a signal to show the promotion post-edit modal
- Scenario: Anonymous user edits a worklist article — skipped, no promotion, no modal
- Given an ongoing campaign event with contributions enabled
- And the event worklist contains article "Main Page"
- And the editing user is anonymous (not logged in)
- When the anonymous user edits and saves "Main Page"
- Then no promotion record is created
- And the frontend does not receive a signal to show the promotion post-edit modal
- Scenario: User who has opted out of event discovery edits a worklist article — skipped
- Given an ongoing campaign event with contributions enabled
- And the event worklist contains article "Main Page"
- And user "Dave" is logged in
- And Dave is not a registered participant of that event
- And Dave has turned off event discovery in his preferences
- When Dave edits and saves "Main Page"
- Then no promotion record is created
- And the frontend does not receive a signal to show the promotion post-edit modal
- Scenario: Registered participant edits a worklist article — outside this task’s audience
- Given an ongoing campaign event with contributions enabled
- And the event worklist contains article "Main Page"
- And user "Alice" is logged in
- And Alice is a registered participant of that event
- When Alice edits and saves "Main Page"
- Then the promotion post-edit path from this task is not taken
- And no promotion record is created for this task’s flow
- And participant post-save behaviour applies instead (task-12)
- Scenario: From the open modal, "Visit event page" opens EventDetails in a new tab
- Given the promotion post-edit modal is open for an event
- When Carol clicks "Visit event page"
- Then the EventDetails page for that event opens in a new browser tab
- And the modal is dismissed
- Scenario: From the open modal, "Skip" dismisses without an extra promotion call
- Given the promotion post-edit modal is open for an event
- When Carol clicks "Skip"
- Then the modal is dismissed
- And no additional API call is made solely to record promotion for this dismissal




