Page MenuHomePhabricator

Post-save: promotion flow once per user and event — backend + Front End (logged-in, not a participant of that event)
Closed, ResolvedPublic5 Estimated Story Points

Description

NOTE: Remove sections that are not needed. Instead, leave the section and write NOT NEEDED as its content.

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 promoteMore than one event to promote
hide message (1).png (1,712×3,732 px, 392 KB)
event pathways more than 1 event (1).png (1,712×3,732 px, 329 KB)

Truncation of event name if it is too long and doesn't fit in one line:

more than 1 event large string.png (1,712×3,732 px, 336 KB)

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
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.
  • "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
NOTE: This are all drafts and we will refine them

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

Event Timeline

cmelo set the point value for this task to 5.Jun 25 2026, 4:46 PM

decided on June 29 meeting: Show 1 to 3 events, sorted by start date

@JFernandez-WMF and @OBenhmida to

  • change the copy / language on the dialog
  • Show the list of 3 max events + Link to events

Decided with @OBenhmida in 1:1 today:

For use cases where we promote more than one event, each event will be presented within a Card that includes the event name. The card should be clickable and take the user to the event page. See mockup:

event pathways more than 1 event (1).png (1,712×3,732 px, 329 KB)

If event name is too long, we truncate the text so it remains in one line. See mockup:

more than 1 event large string.png (1,712×3,732 px, 336 KB)

@cmelo let me know if you have any questions. I added the new copy for >1 event promotion to the task description. I left the 'message key' text empty because I am not very knowledgeable with that :) Feel free to fill it in.

For use cases where we promote more than one event, each event will be presented within a Card that includes the event name. The card should be clickable and take the user to the event page.

Thank you, looks good to me but I have two questions on the copy:

  • There's a possibility that there's more than 3 events targeting that article. Could we generalise the message a bit to say "as part of these active events" instead of the number? (Or "the following" instead of "these", etc.)
  • The verb "tap" sounds mobile-specific, could we use a more neutral alternative that works for both desktop and mobile? E.g. "choose", but surely there are better options :)

I looove these mockups @JFernandez-WMF @OBenhmida !
Also, +1 to @Daimona's suggestion – if there are more than 3 events targeting the same article, have you considered a "see all" link or some other way to handle overflow?

A couple of additional questions from me:

  1. Will you be promoting online events only? If not, could you add a label or indicator for in-person events (e.g., a location pin or an "in-person" tag)? This could help users quickly understand if an event is relevant to them.
  1. Related to the above, but also relevant for online events: Would it be feasible to include the event's country or city in the card? Even a flag could make it easier for users to decide which event to click, especially when multiple events are shown.

Curious to hear everyone's thoughts! 🙏

@Daimona @SEgt-WMF thank you for the very spot-on feedback! @OBenhmida i don't think we have acted on this yet ^, i think we should. regarding copy, maybe we should change it to: "This article will be improved as part of these active events. Visit one to learn more."'

If there are more than 3 events targeting the same article, have you considered a "see all" link or some other way to handle overflow?

i think that if we add a "see all" link, that would land on Special:AllEvents, and i wonder if the user would feel a bit lost and lose the intent of actually joining an event by seeing too much at once. @Daimona @MHorsey-WMF @cmelo or is there any way to filter Special:AllEvents down so we could link to a more relevant subset?

A couple of additional questions from me:
Will you be promoting online events only? If not, could you add a label or indicator for in-person events (e.g., a location pin or an "in-person" tag)? This could help users quickly understand if an event is relevant to them.
Related to the above, but also relevant for online events: Would it be feasible to include the event's country or city in the card? Even a flag could make it easier for users to decide which event to click, especially when multiple events are shown.

thank you for this feedback! :D i actually am not sure if the events we are promoting are only online or also in-person? i'll let someone else chime in and we can act on your suggestions!

i think that if we add a "see all" link, that would land on Special:AllEvents, and i wonder if the user would feel a bit lost and lose the intent of actually joining an event by seeing too much at once. @Daimona @MHorsey-WMF @cmelo or is there any way to filter Special:AllEvents down so we could link to a more relevant subset?

Yeah, there is no such filter at the moment...

This is being done in subtasks T431571 and T431572 and all the AC have been copied over AFAICS, hence closing this one for ease of tracking pending work.