Page MenuHomePhabricator

[EPIC] Move donation entry point on Vector 2022
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

  • The introduction of the Vector 2022 skin moved the donate link from being available on pageload to a collapsed state under the main menu. We would like to experiment with adding the donate link to be accessible only with one click

User story

  • As a donor, I want the ability to find the link to donate quickly, so that it's easier for me to donate

Requirements

  • Donate link should appear at the top of the page as per the mock for anonymous users only
  • For logged-in users, donate link should remain in the sidebar
  • For temporary accounts, the link should remain in the sidebar
  • Breakpoints for the top bar should not change
  • Clicks to the donate link should be tracked as they are right now
  • Feature should have a feature flag

Requirement

Ensure that the donation entry point is moved to the top of the page for anonymous users in the Vector 2022 skin, while it remains in the sidebar for logged-in and temporary accounts. The functionality should include click tracking and be controlled via a feature flag.

BDD

Feature: Move Donation Entry Point on Vector 2022

  Scenario: Show donate link at the top of the page for anonymous users
    Given the user is anonymous
    When the page loads
    Then the donate link should appear at the top of the page

  Scenario: Keep donate link in the sidebar for logged-in users
    Given the user is logged in
    When the page loads
    Then the donate link should remain in the sidebar

  Scenario: Keep donate link in the sidebar for temporary accounts
    Given the user has a temporary account
    When the page loads
    Then the donate link should remain in the sidebar

  Scenario: Track clicks to the donate link
    Given the user clicks the donate link
    Then the click should be tracked

Test Steps

Test Case 1: Verify Donate Link at Top of Page for Anonymous Users

  1. Log out and navigate to the Vector 2022 skin.
  2. AC1: Confirm that the donate link is visible at the top of the page.

Test Case 2: Verify Donate Link in Sidebar for Logged-In Users

  1. Log in and navigate to the Vector 2022 skin.
  2. AC2: Confirm that the donate link is in the sidebar.

Test Case 3: Verify Donate Link in Sidebar for Temporary Accounts

  1. Create a temporary account and navigate to the Vector 2022 skin.
  2. AC3: Confirm that the donate link is in the sidebar.

Test Case 4: Verify Click Tracking for Donate Link

  1. Click on the donate link as any type of user.
  2. AC4: Confirm that the click is tracked.

Screenshot 2024-08-19 at 14.30.12.png (1×2 px, 776 KB)

(https://www.figma.com/design/ZuwkGkyEV2LrNn09sEqJiX/WE3.1-Content-Discovery?node-id=1-2&t=OaaN9h3fR4DtyRCt-0) Vector 2022 only for the scope of this ticket

Acceptance criteria

  • All requirements should be completed

Communication criteria - does this need an announcement or discussion?

Rollback plan

  • What is the rollback plan in production for this task if something goes wrong?

This task was created by Version 1.2.0 of the Web team task template using phabulous

QA Results - Beta

ACStatusDetails
1T372757#10123922 will resolve in T373566
2T372757#10123922
3T372757#10123922
4T372757#10123922

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Are we showing this for all users or just anonymous? The mocks are incomplete here and the sole mock is a little confusing as it shows the login link and the username (and doesn't represent the current state of this menu for either states)

If this is intended for logged in users:

  • What is the behaviour at lower resolutions? Does it collapse or hide, or do we modify the search collapse behaviour to apply earlier?
  • We must test with long usernames at different breakpoints.
  • The menu code here is delicate and may need some refactoring to support this.

Are we showing this for all users or just anonymous? The mocks are incomplete here and the sole mock is a little confusing as it shows the login link and the username (and doesn't represent the current state of this menu for either states)

If this is intended for logged in users:

  • What is the behaviour at lower resolutions? Does it collapse or hide, or do we modify the search collapse behaviour to apply earlier?
  • We must test with long usernames at different breakpoints.
  • The menu code here is delicate and may need some refactoring to support this.

Anonymous only - added to task description.

ovasileva updated the task description. (Show Details)
ovasileva changed the point value for this task from 3 to 5.Aug 26 2024, 5:34 PM

Per https://wikimedia.slack.com/archives/G8QAPHCTT/p1724885229231239?thread_ts=1724884389.970359&cid=G8QAPHCTT, we're shifting the scope of this to be 1. feature flag 2. add donate link to user menu

everything else will be handled in a separate ticket

Are we showing this for all users or just anonymous? The mocks are incomplete here and the sole mock is a little confusing as it shows the login link and the username (and doesn't represent the current state of this menu for either states)

If this is intended for logged in users:

  • What is the behaviour at lower resolutions? Does it collapse or hide, or do we modify the search collapse behaviour to apply earlier?
  • We must test with long usernames at different breakpoints.
  • The menu code here is delicate and may need some refactoring to support this.

Sorry about the mock confusion. I meant for the username there to represent IP editors. Confirming that this is for logged-out anons only. There is a lot of stuff in that top right corner for folks who are logged in, so this should simplify things somewhat, I hope.

Re: responsive behaviour: this is a really good question, and it's a miss on my part that this wasn't included in the spec. Apologies for that. I assumed that we would maintain the existing breakpoint, and that usernames would have a max width before they get truncated so they don't interfere with the search bar. Can you confirm that this is the case @SToyofuku-WMF ?

@SToyofuku-WMF and I just chatted about this. We decided that we would maintain the existing breakpoint for now. Assuming that the donate CTA never gets longer than ~25 chars (2x the length of faire un don in FR), the search bar remains at a usable width, so we should be ok.

We also decided that, for now, the donate link wouldn't appear in the top right for people with temporary accounts (this is in beta, atm, and will probably need a refactor if/when it goes live). Will update the reqs accordingly.
@ovasileva Flagging this ^^ because it may constitute a small change in scope.

Here's the mock with our very long donate link.

1440px

image.png (2×2 px, 1 MB)

1120px (current breakpoint)

Screenshot 2024-08-29 at 3.38.58 PM.png (1×2 px, 364 KB)

Just confirming it's fine from a fundraising pov to hide for temporary accounts. We also won't be showing fundraising banners to temporary accounts, at least at first.

And a question: do you know if the new donate link will still have the id n-sitesupport? We have some javascript in the banners which points out the donate link when a user closes the banner, so will want to update that.

Change #1069280 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

[mediawiki/extensions/WikimediaMessages@master] Add a donate link to user links menu in vector for anonymous users

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

Hi @Pcoombe! It'll now be ca-sitesupport - hopefully that's okay

Change #1069280 merged by jenkins-bot:

[mediawiki/extensions/WikimediaMessages@master] Add a donate link to user links menu in vector for anonymous users

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

Change #1069334 had a related patch set uploaded (by Stoyofuku-wmf; author: Stoyofuku-wmf):

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

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

SToyofuku-WMF added a subscriber: GMikesell-WMF.

Taking this back until I can deploy the donate link on beta cluster - from there QA will be both making sure it's not on prod and making sure it is on beta

Change #1069334 merged by jenkins-bot:

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

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

Mentioned in SAL (#wikimedia-operations) [2024-09-03T20:36:07Z] <toyofuku@deploy1003> Started scap sync-world: Backport for [[gerrit:1069334|Turn on donate link in beta (T372757)]], [[gerrit:1070310|Disable lead paragraph transform on Wikivoyages]]

Mentioned in SAL (#wikimedia-operations) [2024-09-03T20:38:19Z] <toyofuku@deploy1003> jdlrobson, toyofuku: Backport for [[gerrit:1069334|Turn on donate link in beta (T372757)]], [[gerrit:1070310|Disable lead paragraph transform on Wikivoyages]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-09-03T20:45:50Z] <toyofuku@deploy1003> Finished scap sync-world: Backport for [[gerrit:1069334|Turn on donate link in beta (T372757)]], [[gerrit:1070310|Disable lead paragraph transform on Wikivoyages]] (duration: 09m 43s)

Looking good on the beta cluster! @SToyofuku-WMF - a quick note on the copy - right now it reads "Donate to Wikipedia". It should be just "Donate"

@ovasileva that's due to beta specifically having the message key configured here https://en.wikipedia.beta.wmflabs.org/wiki/MediaWiki:Sitesupport - in prod it will match the message/url/title of the link in the sidebar

SToyofuku-WMF moved this task from Doing to QA on the Web-Team-Backlog (FY2024-25 Q1 Sprint 5) board.
SToyofuku-WMF added a subscriber: Edtadros.

This is now ready for QA

Note to @Edtadros/@GMikesell-WMF - it's currently only testable on the beta cluster, and the link will look slightly different than in prod. As long as it matches what is currently in the sidebar on beta (sidenote, it will still be present in the sidebar), then it should be all set

Test Result - Beta

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

Test Artifact(s):

Test Steps

Test Case 1: Verify Donate Link at Top of Page for Anonymous Users

  1. Log out and navigate to the Vector 2022 skin.
  2. AC1: Confirm that the donate link is visible at the top of the page.

screenshot 46.png (856×1 px, 186 KB)

Test Case 2: Verify Donate Link in Sidebar for Logged-In Users

  1. Log in and navigate to the Vector 2022 skin.
  2. AC2: Confirm that the donate link is in the sidebar.

screenshot 47.png (856×1 px, 196 KB)

Test Case 3: Verify Donate Link in Sidebar for Temporary Accounts

  1. Create a temporary account and navigate to the Vector 2022 skin.
  2. AC3: Confirm that the donate link is in the sidebar.

screenshot 48.png (856×1 px, 439 KB)

Test Case 4: Verify Click Tracking for Donate Link

  1. Click on the donate link as any type of user.
  2. AC4: Confirm that the click is tracked.

screenshot 49.png (1×1 px, 197 KB)

@Jdlrobson @Pcoombe I did not see the donate link at the top right for fr.wikipedia.org as seen in the screenshot.

Test Result - PROD

Status: ❌ AC1
Environment: PROD
OS: macOS
Browser: Chrome
Device: MS MBA
Emulated Device: NA

Test Artifact(s):

Test Steps

Test Case 1: Verify Donate Link at Top of Page for Anonymous Users

  1. Log out and navigate to the Vector 2022 skin.
  2. AC1: Confirm that the donate link is visible at the top of the page.

Not visible at the top right corner even on fr.wikipedia.org

2024-09-12_07-34-10.png (883×2 px, 404 KB)

Test Case 2: Verify Donate Link in Sidebar for Logged-In Users

  1. Log in and navigate to the Vector 2022 skin.
  2. AC2: Confirm that the donate link is in the sidebar.

2024-09-18_09-38-39.png (537×1 px, 247 KB)

Test Case 3: Verify Donate Link in Sidebar for Temporary Accounts

  1. Create a temporary account and navigate to the Vector 2022 skin.
  2. AC3: Confirm that the donate link is in the sidebar.

2024-09-10_14-02-07.png (670×2 px, 401 KB)

Test Case 4: Verify Click Tracking for Donate Link

  1. Click on the donate link as any type of user.
  2. AC4: Confirm that the click is tracked.

2024-09-10_14-04-31.png (1×3 px, 393 KB)

@GMikesell-WMF It's feature flagged, and only on fr.wikipedia.org and Wikifunctions in production at the moment. Should be going out to other sites in todays late backport window.

The text should say "Donate" (or localised equivalent), the "Donate to Wikipedia" seen on Beta is just an override there which should probably be removed.

Hey @GMikesell-WMF yes failure is expected at this stage. We'll resolve this ticket and QA this again as part of T373566

GMikesell-WMF updated the task description. (Show Details)

Just to summarize the progress here. We've currently deployed the more prominent donate link to the beta cluster for anonymous users, so I'm signing off this ticket based on that criteria.

Getting the donate link to remain in the sidebar for logged-in users, however, has proven more challenging, because we recently discovered that the sidebarCache doesn't vary by logged-in/logged-out users, which means we have to modify our original implementation (i.e this patch).

That work is on-going and covered in T373566.

ovasileva renamed this task from Move donation entry point on Vector 2022 to [EPIC] Move donation entry point on Vector 2022.Sep 19 2024, 9:55 AM

Hi, thanks for working on this! I noticed that at smaller breakpoints this appears between the Search and Appearance icon, and it might be better if it was with the other text links. Not a blocker, just a potential improvement. Should I create a new task for this?

Screenshot 2024-09-20 at 17.55.59.png (126×1 px, 40 KB)

@Pcoombe that would be great! We'll have to prioritize it and figure out with the team where to put user page links in general vs the appearance menu, but having that tracked would help (thank you!)

Thank you! I'll talk with @ovasileva about prioritizing these