Page MenuHomePhabricator

[REQUEST] Add a blue banner to visual editor after publishing or abandoning an app edit
Open, HighPublic2 Estimated Story Points

Description

What's requested:

Currently, when a user reaches visual editor through the mobile apps (while using the returntoapp=true parameter), it automatically redirects to a url like this upon edit publish and edit abandon: wikipedia://en.wikipedia.org/wiki/Cat?saved=true&revision=1234. See T422075: [SPIKE] Decide on and implement return to app parameter for background on this work.

Apps now do not want to automatically redirect in these instances, and instead display a blue banner along the top that says "Back to the app". You can view designs in the Figma linked at this parent task: T431857: [User Story] Visual Editor: App return journey from web.

Figma link here: https://www.figma.com/design/ZhMT1jiTjWfDhKB713cDfX/Visual-Editor-Hand-off?node-id=991-1623&p=f&t=5BA96IBPnI4EN127-0

This banner should display at the top of the article when the user either successfully posts an edit or if they abandon the edit. Upon tap of this blue banner, the redirect to wikipedia://en.wikipedia.org/wiki/Cat?saved=true&revision=1234 should trigger.

Why it's requested:

User testing was done on this flow, and it was unanimous that users want to be able to choose for themselves if they go back to the app. Link to user testing report here: https://docs.google.com/document/d/1oGUtSbTe4DfFKejO29BFm_jUw94ATcg6wpgH2VdD6-Q/edit?usp=sharing

Deadline for request:

As soon as possible please - our deadline in Asana for the hypothesis launch is September

Other helpful information:

Single screen taken from Figma for info but please see the link too:

Screenshot 2026-08-13 at 16.31.42.png (394×856 px, 165 KB)

Event Timeline

The banner should just be in the post-save page, and should disappear if the user sticks around?

Change #1339009 had a related patch set uploaded (by Cklimas; author: Cklimas):

[mediawiki/extensions/MobileFrontend@master] Return to App: Add configurable behavior, banner option

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

Test wiki created on Patch demo by TSevener (WMF) using patch(es) linked to this task:
https://1c81ff95e4.catalyst.wmcloud.org/w/

Test wiki on Patch demo by TSevener (WMF) using patch(es) linked to this task was deleted:

https://1c81ff95e4.catalyst.wmcloud.org/w/

Tsevener set the point value for this task to 2.Sep 14 2026, 4:29 PM

Change #1342049 had a related patch set uploaded (by Cklimas; author: Cklimas):

[operations/mediawiki-config@master] MobileFrontend: Add app icons

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

Change #1342049 merged by jenkins-bot:

[operations/mediawiki-config@master] MobileFrontend: Add app icons

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

Mentioned in SAL (#wikimedia-operations) [2026-09-15T21:08:30Z] <jdlrobson@deploy1003> Started scap sync-world: Backport for [[gerrit:rMW1342049499a2|MobileFrontend: Add app icons (T434258)]]

Mentioned in SAL (#wikimedia-operations) [2026-09-15T21:12:47Z] <jdlrobson@deploy1003> jdlrobson, cklimas: Backport for [[gerrit:rMW1342049499a2|MobileFrontend: Add app icons (T434258)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-09-15T21:20:18Z] <jdlrobson@deploy1003> Finished scap sync-world: Backport for [[gerrit:rMW1342049499a2|MobileFrontend: Add app icons (T434258)]] (duration: 11m 47s)

Test wiki created on Patch demo by CKlimas-WMF using patch(es) linked to this task:
https://4dc130a92f.catalyst.wmcloud.org/w/

@TLessa-WMF to test this out on the patchdemo instance:

  1. Go to https://4dc130a92f.catalyst.wmcloud.org/ and register an account.
  2. Once you're logged in, go to the following URL. It simulates the handoff from app to web: http://4dc130a92f.catalyst.wmcloud.org/wiki/Test_Page/?returntoapp=1&useformat=mobile&veaction=edit
  3. Either cancel out of the edit or save changes. The banner should show up in both cases.

I've noticed this patchdemo instance is a bit sluggish to load the editor. I believe this is an artifact of patchdemo and not an issue my code has introduced, but I could be wrong :-/.

Updated the design QA doc with notes.

Design QA done, all good from the design side! Thanks @Cklimas

Test wiki on Patch demo by CKlimas-WMF using patch(es) linked to this task was deleted by CKlimas-WMF via DeleteWikis-SingleDelete:

https://4dc130a92f.catalyst.wmcloud.org/w/

Change #1344053 had a related patch set uploaded (by Cklimas; author: Cklimas):

[mediawiki/extensions/MobileFrontend@master] Return to app: Implement banner display but don't connect to ?returntoapp yet

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

Change #1339009 abandoned by Cklimas:

[mediawiki/extensions/MobileFrontend@master] Return to App: Add configurable behavior, banner option

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

Change #1344053 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Return to app: Implement banner display but don't connect to ?returntoapp yet

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

Change #1344335 had a related patch set uploaded (by Cklimas; author: Cklimas):

[mediawiki/extensions/MobileFrontend@master] tests: prevent spurious warning about redirection

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

Change #1344335 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] tests: prevent spurious warning about redirection

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

Change #1344754 had a related patch set uploaded (by Cklimas; author: Cklimas):

[mediawiki/extensions/MobileFrontend@master] Return to app: Listen to hooks, add banner display

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

Change #1344758 had a related patch set uploaded (by Cklimas; author: Cklimas):

[mediawiki/extensions/MobileFrontend@master] Patchdemo only: Add test return to app banner config

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

Test wiki created on Patch demo by CKlimas-WMF using patch(es) linked to this task:
https://2eed3f4893.catalyst.wmcloud.org/w/

Test wiki on Patch demo by CKlimas-WMF using patch(es) linked to this task was deleted by CKlimas-WMF via DeleteWikis-SingleDelete:

https://2eed3f4893.catalyst.wmcloud.org/w/

Test wiki created on Patch demo by CKlimas-WMF using patch(es) linked to this task:
https://d48b949e2a.catalyst.wmcloud.org/w/

Change #1344754 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Return to app: Listen to hooks, add banner display

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

Change #1346087 had a related patch set uploaded (by Cklimas; author: Cklimas):

[operations/mediawiki-config@master] InitialiseSettings: Enable return-to-app banner on testwiki

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

Change #1346087 merged by jenkins-bot:

[operations/mediawiki-config@master] InitialiseSettings: Enable return-to-app banner on testwiki

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

Mentioned in SAL (#wikimedia-operations) [2026-09-29T20:33:50Z] <cklimas@deploy1003> Started scap sync-world: Backport for [[gerrit:rOPUP134608746ac3|InitialiseSettings: Enable return-to-app banner on testwiki (T434258)]]

Mentioned in SAL (#wikimedia-operations) [2026-09-29T20:38:02Z] <cklimas@deploy1003> cklimas: Backport for [[gerrit:rOPUP134608746ac3|InitialiseSettings: Enable return-to-app banner on testwiki (T434258)]] synced to the testservers (see https://wikitech.wikimedia.org/wiki/Mwdebug). Changes can now be verified there.

Mentioned in SAL (#wikimedia-operations) [2026-09-29T20:48:21Z] <cklimas@deploy1003> Finished scap sync-world: Backport for [[gerrit:rOPUP134608746ac3|InitialiseSettings: Enable return-to-app banner on testwiki (T434258)]] (duration: 14m 32s)

This is now on testwiki (only). I tested it out with local versions of the app that had ?returntoapp=1 added to the VE edit URL and the banner's working for me at a basic level there, though I'm seeing some rough edges.

QA is currently blocked on changes in the mobile apps, to send ?returntoapp=1 when handing off to web for VE.

@ABorbaWMF this is ready for QA. It should be tested with both iOS and Android. Ping me on Slack if you need help getting up and running with it!

@ABorbaWMF QA steps are here: https://phabricator.wikimedia.org/T438473#12390220

This should be done on both Android and iOS. These are the scenarios I've been walking through during development:

  • Save an edit as a logged-in user
  • Save an edit as an anonymous user (e.g. which creates a temp account)
  • Abandon an edit without making any changes
  • Abandon an edit after making a change (e.g. triggering a confirmation prompt)

Testing on 50611-alpha-2026-10-09
Tested on:
Pixel 8, Android 16
Galaxy A36, Android 15

Wokring for me

@ABendall-WMF this is ready for a final check before we enable in production. It is enabled on testwiki only right now.