Page MenuHomePhabricator

Complete and QA the donate Minerva banner
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

We started work on building out the new banner in T383630 however were unable to finish the work due to problems integrating Minerva’s donation banner messages (skin-minerva-donate-banner-*) are not displaying correctly and show placeholders (⧼skin-minerva-donate-banner-message⧽). This issue prevents the donation call-to-action from appearing as intended and therefore code review and QA.


User Story

As a Wikipedia mobile user, I want to see a properly formatted donation banner.


Requirements

  1. The donation button is visible only in the beta cluster when the feature flag is enabled.
  2. Button text and URLs adapt dynamically based on the selected language, supporting RTL and LTR layouts.
  3. The implementation passes design review and testing
  4. The feature can be safely disabled or removed via the feature flag without impacting production.
  5. By default, the new donation banner is not enabled in production.

BDD

Feature: Verify messages working correctly

  Scenario: Messages are displayed correctly on Special:AllMessages
    Given I visit Special:AllMessages
    When I search for "skin-minerva-donate-banner-message"
    Then I see "Donate Now" instead of a placeholder

  Scenario: API returns the correct message
    Given I call the API with "api.php?action=query&meta=allmessages&ammessages=skin-minerva-donate-banner-message"
    When I check the response
    Then it returns "Donate Now"

Feature: Verify feature flag control is disabled by default

  Scenario: Donate banner is not visible when the feature flag is disabled
    Given I visit the beta cluster or patchdemo
    When I open the main menu
    Then I do not see the "Donate Now" banner

  Scenario: Donation banner displays correctly for anonymous users
    Given I visit a Minerva-skinned page as an anonymous user with the donation banner enabled
    When I open the sidebar so the donation banner loads
    Then the donation banner displays the correct text, subtitle, image, and link

  Scenario: Donation banner is not visible for logged-in users
    Given I visit a Minerva-skinned page as a logged-in user with the donation banner enabled
    When I open the sidebar
    Then I do not see the donation banner

Feature: Verify dynamic text

  Scenario: RTL/LTR layouts are supported without design issues
    Given I visit a Minerva-skinned page as a logged-in user with the donation banner enabled in a RTL language
    When I open the sidebar
    Then RTL/LTR layouts (e.g., Arabic) are supported without design issues
    And when the headline is longer than the available space, it extends above the animation, pushing it down

Feature: Verify URL requirements

  Scenario: Donate banner link includes required URL parameters
    Given I visit a Minerva-skinned page with the donate banner
    When I open the sidebar and click donate
    Then the URL includes "uselang" and "wmf_campaign" parameters based on the selected language
    And the URL format follows "https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=<lang>.wikipedia.org&uselang=<lang>"

Feature: Verify instrumentation requirements

  Scenario: Web UI event is fired upon clicking the donate banner
    Given I visit a Minerva-skinned page with the donate banner
    When I open the sidebar and click the donate banner
    Then a web UI actions click event with name "menu.donateBanner" is fired

Test Steps

Test Case 1: Messages are displayed correctly on Special:AllMessages

  1. Visit Special:AllMessages.
  2. Search for skin-minerva-donate-banner-message.
  3. AC1: “Donate Now” is displayed instead of a placeholder.

Test Case 2: API returns the correct message

  1. Call the API with api.php?action=query&meta=allmessages&ammessages=skin-minerva-donate-banner-message.
  2. Check the response.
  3. AC2: The response contains “Donate Now”.

Test Case 3: Donate banner is not visible when feature flag is disabled

  1. Visit the beta cluster or Patchdemo.
  2. Open the main menu.
  3. AC3: The “Donate Now” banner is not visible.

Test Case 4: Donation banner displays correctly for anonymous users

  1. Visit a Minerva-skinned page as an anonymous user with the donation banner enabled.
  2. Open the sidebar so the donation banner loads.
  3. AC4: The donation banner displays the correct text, subtitle, image, and link.

Test Case 5: Donation banner is not visible for logged-in users

  1. Visit a Minerva-skinned page as a logged-in user with the donation banner enabled.
  2. Open the sidebar.
  3. AC5: The donation banner is not visible.

Test Case 6: RTL/LTR layouts are supported without design issues

  1. Visit a Minerva-skinned page as a logged-in user with the donation banner enabled in a RTL language.
  2. Open the sidebar.
  3. AC6: RTL/LTR layouts (e.g., Arabic) are supported without design issues.
  4. AC7: When the headline is longer than the available space, it extends above the animation, pushing it down. See this example.

Test Case 7: Donate banner link includes required URL parameters

  1. Visit a Minerva-skinned page with the donate banner.
  2. Open the sidebar and click donate.
  3. AC8: The URL includes uselang and wmf_campaign parameters based on the selected language.
  4. AC9: The URL follows the format https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=<lang>.wikipedia.org&uselang=<lang>.

Test Case 8: Web UI event is fired upon clicking the donate banner

  1. Visit a Minerva-skinned page with the donate banner.
  2. Open the sidebar and click the donate banner.
  3. AC10: A web UI actions click event with name menu.donateBanner is fired. ---

QA Results - Beta

QA Results - Prod


Design

No UI changes—fix ensures the correct message is displayed.


Acceptance Criteria


Implementation notes

  • Ensure skin-minerva-donate-banner-* messages are properly overridden in WikimediaMessages. _
  • Confirm wikimediaoverrides/en.json loads correctly.
  • Verify includes/Hooks.php registers these messages in $keysToOverride.
  • Check Special:AllMessages and API return correct values.
  • Ensure Minerva displays the banner correctly.

Communication

Notify the team once the feature is deployed to the testing environment (beta cluster).
Collaborate with QA to validate the feature in the testing environment.
Share any observed issues or adjustments needed during testing with the team.


Rollback Plan

Revert changes


Created using the Web team task template via phabulous

Event Timeline

Jdlrobson-WMF renamed this task from Fix Minerva Donation Banner Messages Not Displaying Correctly to Complete Minerva banner.Feb 18 2025, 11:34 PM
Jdlrobson-WMF updated the task description. (Show Details)
Jdlrobson-WMF added a subscriber: JScherer-WMF.
Jdlrobson-WMF changed the task status from Open to In Progress.Feb 19 2025, 12:11 AM
Jdlrobson-WMF assigned this task to KSarabia-WMF.
Jdlrobson-WMF triaged this task as High priority.
Jdlrobson-WMF moved this task from Sprint Backlog to Q3 on the Web-Team board.
Jdlrobson-WMF subscribed.

(Refinement in process)

Jdlrobson-WMF renamed this task from Complete Minerva banner to Complete and QA the Minerva banner.Feb 19 2025, 12:36 AM
Jdlrobson-WMF updated the task description. (Show Details)
Jdlrobson-WMF set the point value for this task to 5.Feb 19 2025, 4:30 PM
Jdlrobson-WMF moved this task from Q3 to Sprint Backlog on the Web-Team board.
Jdlrobson-WMF renamed this task from Complete and QA the Minerva banner to Complete and QA the donate Minerva banner.Feb 19 2025, 5:18 PM
Jdlrobson-WMF updated the task description. (Show Details)

Change #1119574 had a related patch set uploaded (by Jdlrobson; author: Kimberly Sarabia):

[mediawiki/skins/MinervaNeue@master] Donate banner

https://gerrit.wikimedia.org/r/1119574

Change #1118603 had a related patch set uploaded (by Jdlrobson; author: Kimberly Sarabia):

[mediawiki/extensions/WikimediaMessages@master] [WIP] Adds donate button txt

https://gerrit.wikimedia.org/r/1118603

Change #1122671 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[operations/mediawiki-config@master] Add config for donate banner to be enabled

https://gerrit.wikimedia.org/r/1122671

Planning to backport this for beta cluster today.

Change #1122671 merged by jenkins-bot:

[operations/mediawiki-config@master] Add config for donate banner to be enabled

https://gerrit.wikimedia.org/r/1122671

Change #1118603 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Adds donate button messages

https://gerrit.wikimedia.org/r/1118603

Change #1119574 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Donate banner

https://gerrit.wikimedia.org/r/1119574

Change #1123046 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[operations/mediawiki-config@master] Disable donate link in beta

https://gerrit.wikimedia.org/r/1123046

Change #1123046 merged by jenkins-bot:

[operations/mediawiki-config@master] Disable donate link in beta

https://gerrit.wikimedia.org/r/1123046

Change #1124161 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/skins/MinervaNeue@master] Donate banner: Instrument main menu and donate banner clicks

https://gerrit.wikimedia.org/r/1124161

Merged! I wasn't able to verify that events were firing locally, but I was able to test that the attribute was set 🤞

Edtadros subscribed.

@KSarabia-WMF, this is probably a pass, but I wanted to highlight the questions below.

Status: ✅ PASS / ❓Need More Info
Environment: Beta
OS: macOS
Browser: Chrome
Device: MS

Test Artifact(s):

Test Steps

Test Case 1: Messages are displayed correctly on Special:AllMessages

  1. Visit Special:AllMessages.
  2. Search for skin-minerva-donate-banner-message.
  3. ✅ AC1: “Donate Now” is displayed instead of a placeholder.

screenshot 62.png (805×1 px, 110 KB)

Test Case 2: API returns the correct message

  1. Call the API with api.php?action=query&meta=allmessages&ammessages=skin-minerva-donate-banner-message.
  2. Check the response.
  3. ✅ AC2: The response contains “Donate Now”.

screenshot 63.png (805×1 px, 74 KB)

Test Case 3: Donate banner is not visible when feature flag is disabled

  1. Visit the beta cluster or Patchdemo.
  2. Open the main menu.
  3. ⬜ AC3: The “Donate Now” banner is not visible.

The feature flag was not implemented.
Test Case 4: Donation banner displays correctly for anonymous users

  1. Visit a Minerva-skinned page as an anonymous user with the donation banner enabled.
  2. Open the sidebar so the donation banner loads.
  3. ✅ AC4: The donation banner displays the correct text, subtitle, image, and link.

screenshot 64.png (805×1 px, 120 KB)

Test Case 5: Donation banner is not visible for logged-in users

  1. Visit a Minerva-skinned page as a logged-in user with the donation banner enabled.
  2. Open the sidebar.
  3. ❓ AC5: The donation banner is not visible.

The original BDD before I formatted it read:

**Given** I visit a Minerva-skinned page as a logged in user with donation banner enabled (either beta cluster or patchdemo)
**When** I open the sidebar
**Then** I do not see the donation banner

I suspect that is a typo, the donation banner is visible.

screenshot 65.png (1×1 px, 170 KB)

Test Case 6: RTL/LTR layouts are supported without design issues

  1. Visit a Minerva-skinned page as a logged-in user with the donation banner enabled in a RTL language.
  2. Open the sidebar.
  3. ✅ AC6: RTL/LTR layouts (e.g., Arabic) are supported without design issues.

screenshot 66.png (1×1 px, 77 KB)

  1. ❓ AC7: When the headline is longer than the available space, it extends above the animation, pushing it down. See this example.

I couldn't find any language on beta where Donate Now was two lines. I added a bunch of text in dev tools to it, but it just stayed on the same line, so I couldn't reproduce the image in the example.

screenshot 67.png (1×1 px, 222 KB)

Test Case 7: Donate banner link includes required URL parameters

  1. Visit a Minerva-skinned page with the donate banner.
  2. Open the sidebar and click donate.
  3. ✅ AC8: The URL includes uselang and wmf_campaign parameters based on the selected language.

see AC9

  1. ✅ AC9: The URL follows the format https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=<lang>.wikipedia.org&uselang=<lang>.

screenshot 69.png (1×1 px, 209 KB)

screenshot 68.png (1×1 px, 235 KB)

Test Case 8: Web UI event is fired upon clicking the donate banner

  1. Visit a Minerva-skinned page with the donate banner.
  2. Open the sidebar and click the donate banner.
  3. ❓ AC10: A web UI actions click event with name menu.donateBanner is fired.

The click event value that has the closest name is "action_source": "menu.donate".

{
    "action": "click",
    "font": "1",
    "is_full_width": false,
    "is_page_preview_on": true,
    "is_pinned": false,
    "is_media_viewer_enabled": true,
    "is_dark_mode_prepared_by_os": true,
    "dark_mode_setting": "0",
    "is_dark_mode_on": false,
    "action_context": "stable,amc",
    "viewport_size_bucket": "1000px-1199px",
    "action_source": "menu.donate",
    "is_temp": false,
    "$schema": "/analytics/mediawiki/product_metrics/web_ui_actions/1.0.2",
    "page": {
        "namespace_id": 0
    },
    "performer": {
        "is_logged_in": true,
        "session_id": "12d54ebb22ccb62c42b7",
        "pageview_id": "9f6fb5fdac2d062e21e5",
        "edit_count_bucket": "5-99 edits",
        "groups": [
            "*",
            "user",
            "autoconfirmed"
        ],
        "is_bot": false
    },
    "mediawiki": {
        "skin": "minerva",
        "database": "enwiki"
    },
    "agent": {
        "client_platform": "mediawiki_js",
        "client_platform_family": "mobile_browser"
    },
    "sample": {
        "rate": 1,
        "unit": "session"
    },
    "dt": "2025-03-05T04:01:51.141Z",
    "meta": {
        "stream": "mediawiki.web_ui_actions",
        "domain": "en.wikipedia.beta.wmflabs.org"
    }
}

Test Case 8: Web UI event is fired upon clicking the donate banner

It should be donateBanner so this is a fail. I will take a look.

I suspect that is a typo, the donation banner is visible

Also a fail. Banner shouldn't show to logged in users.

Test Case 8: Web UI event is fired upon clicking the donate banner

It should be donateBanner so this is a fail. I will take a look.

@Edtadros this is working for me - are you clicking the banner or the link to Donate?

Also a fail. Banner shouldn't show to logged in users.

Mm I can replicate this. It should have been fixed by https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1123046/4/wmf-config/InitialiseSettings-labs.php#609
Investigating.

@Edtadros this is working for me - are you clicking the banner or the link to Donate?

@Jdlrobson, I believe I was clicking the link.

@Jdlrobson-WMF, this works now.

Status: ✅ PASS
Environment: Beta
OS: macOS
Browser: Chrome
Device: MS

Test Artifact(s):

Test Steps

Test Case 8: Web UI event is fired upon clicking the donate banner

  1. Visit a Minerva-skinned page with the donate banner.
  2. Open the sidebar and click the donate banner.
  3. ✅ AC10: A web UI actions click event with name menu.donateBanner is fired.

screenshot 70.png (341×1 px, 85 KB)

{
    "action": "click",
    "font": "1",
    "is_full_width": false,
    "is_page_preview_on": false,
    "is_pinned": false,
    "is_media_viewer_enabled": true,
    "is_dark_mode_prepared_by_os": true,
    "dark_mode_setting": "0",
    "is_dark_mode_on": false,
    "action_context": "stable,amc",
    "viewport_size_bucket": "1000px-1199px",
    "action_source": "menu.donateBanner",
    "is_temp": false,
    "$schema": "/analytics/mediawiki/product_metrics/web_ui_actions/1.0.2",
    "page": {
        "namespace_id": 0
    },
    "performer": {
        "is_logged_in": true,
        "session_id": "12d54ebb22ccb62c42b7",
        "pageview_id": "19be9cfbef63ea137986",
        "edit_count_bucket": "5-99 edits",
        "groups": [
            "*",
            "user",
            "autoconfirmed"
        ],
        "is_bot": false
    },
    "mediawiki": {
        "skin": "minerva",
        "database": "enwiki"
    },
    "agent": {
        "client_platform": "mediawiki_js",
        "client_platform_family": "mobile_browser"
    },
    "sample": {
        "rate": 1,
        "unit": "session"
    },
    "dt": "2025-03-05T18:35:03.632Z",
    "meta": {
        "stream": "mediawiki.web_ui_actions",
        "domain": "en.wikipedia.beta.wmflabs.org"
    }
}

Thanks. We will follow up on AC5 in T388036 as that's not working as expected.

Status: ✅ PASS / ❓Need More Info
Environment: Prod
OS: macOS
Browser: Chrome
Device: MS

Test Artifact(s):

Test Steps

Test Case 1: Messages are displayed correctly on Special:AllMessages

  1. Visit Special:AllMessages.
  2. Search for skin-minerva-donate-banner-message.
  3. ✅ AC1: “Donate Now” is displayed instead of a placeholder.

screenshot 135.png (1×1 px, 127 KB)

Test Case 2: API returns the correct message

  1. Call the API with api.php?action=query&meta=allmessages&ammessages=skin-minerva-donate-banner-message.
  2. Check the response.
  3. ✅ AC2: The response contains “Donate Now”.

screenshot 136.png (583×1 px, 77 KB)

Test Case 3: Donate banner is not visible when feature flag is disabled

  1. Visit the beta cluster or Patchdemo.
  2. Open the main menu.
  3. ⬜ AC3: The “Donate Now” banner is not visible.

The feature flag was not implemented.

Test Case 4: Donation banner displays correctly for anonymous users

  1. Visit a Minerva-skinned page as an anonymous user with the donation banner enabled.
  2. Open the sidebar so the donation banner loads.
  3. ✅ AC4: The donation banner displays the correct text, subtitle, image, and link.

screenshot 137.png (634×773 px, 90 KB)

Test Case 5: Donation banner is not visible for logged-in users

  1. Visit a Minerva-skinned page as a logged-in user with the donation banner enabled.
  2. Open the sidebar.
  3. ✅ AC5: The donation banner is not visible.

screenshot 138.png (482×1 px, 286 KB)

Test Case 6: RTL/LTR layouts are supported without design issues

  1. Visit a Minerva-skinned page as a logged-in user with the donation banner enabled in a RTL language.
  2. Open the sidebar.
  3. ✅ AC6: RTL/LTR layouts (e.g., Arabic) are supported without design issues.

screenshot 139.png (542×1 px, 287 KB)

  1. ❓ AC7: When the headline is longer than the available space, it extends above the animation, pushing it down. See this example.

@Jdlrobson-WMF I added bunch of text in devtools. The example shows that the text will wrap, what is happening here is that it just extends beyond the menu. Leaving this as a ❓ instead of a fail because I'm not entirely convinced this is a valid test. Beta was similar.

screenshot 140.png (1×1 px, 573 KB)

Test Case 7: Donate banner link includes required URL parameters

  1. Visit a Minerva-skinned page with the donate banner.
  2. Open the sidebar and click donate.
  3. ✅ AC8: The URL includes uselang and wmf_campaign parameters based on the selected language.

see AC9

  1. ✅ AC9: The URL follows the format https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=<lang>.wikipedia.org&uselang=<lang>.

screenshot 141.png (1×1 px, 547 KB)

Test Case 8: Web UI event is fired upon clicking the donate banner

  1. Visit a Minerva-skinned page with the donate banner.
  2. Open the sidebar and click the donate banner.
  3. ✅ AC10: A web UI actions click event with name menu.donateBanner is fired.

screenshot 142.png (639×814 px, 115 KB)