Page MenuHomePhabricator

Android app does not present edit notices
Closed, ResolvedPublic

Description

Editnotices are an important part of educating users and trying to prevent them from making mistakes when creating and/or modifying content. These notices are currently not presented in the Android interface.

See also: https://en.wikipedia.org/wiki/Wikipedia:Editnotice
Related: T201595: Mobile frontend web does not present edit notices and T201596: iOS app does not present edit notices

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Hi @TheDJ , thanks for raising this. As I see that this issue persists across all mobile platforms (iOS, Android and Mobile Web) is it correct to assume that Edit Notices have never existed on the mobile-versions of this editing experience? If so, this sounds like it would have to be a conversation with the platform team to ensure that we make Edit Notices in the future extend to all applications, agnostic of whether someone is on desktop or on a mobile app.

Is it correct to assume that Edit Notices have never existed on the mobile-versions of this editing experience? If so, this sounds like it would have to be a conversation with the platform team to ensure that we make Edit Notices in the future extend to all applications, agnostic of whether someone is on desktop or on a mobile app.

See also the blocking ticket on writing an action/core API for this, so that they can actually be exposed. They are currently not data that is accessible other than through the EditPage class, which is bad.

JTannerWMF subscribed.

We will investigate this when we clear off some things on our release board

LGoto triaged this task as Medium priority.Sep 29 2021, 4:14 PM

Investigating this a bit, I found some promising things:
There is in fact an API that gives us edit notices in a structured way, namely the visualeditor API:

https://en.wikipedia.org/w/api.php?format=json&action=visualeditor&paction=metadata&page=COVID-19

This API likely wasn't intended to fulfill T45683 per se, but it's practically ideal for our purposes.
We can do either of the following with them:

Show them natively

Since our editing interface is fully native (basically a single EditText box with wikitext in it) we don't have too many options for displaying edit notices before the user starts editing. One possibility that might make sense is to show them as a popup dialog when the wikitext is first shown. They would be parsed as native text (with working links), similar to how we show structured abusefilter and block errors that come from the API.

device-2021-10-05-084220.png (2×1 px, 182 KB)

The popup message is scrollable, in case of very long edit notices, or more than one notice.
This might not be perfect, since the styling is stripped and some of the text/links are parsed clumsily, but I believe it manages to convey the intention of the edit notices successfully.

Inject them into the WebView when previewing

When we show a preview of the user's edits, we load the preview into a WebView. Here we have an opportunity to inject the edit notices at the top of the WebView, which will show them with the correct styling:

device-2021-10-05-090123.png (2×1 px, 181 KB)

Of course the disadvantage here is that this is shown at the preview stage, which is after the user has already spent time editing the article. This is probably more confusing and jarring than showing edit notices at the very start of editing.

Recommendations

Showing edit notices as a popup when first entering the editing experience is a totally viable way to expose this essential information to prospective editors:

device-2021-10-05-090358.png (2×1 px, 208 KB)

After the popup is dismissed, it could still be shown again by tapping a button in the toolbar, or some similar interaction:
device-2021-10-05-093716.png (2×1 px, 252 KB)

Looks good to me @Dbrant — I also like the tooltip to inform users!

An alpha build of this functionality can be found here:
https://github.com/wikimedia/apps-android-wikipedia/actions/runs/1364304840

Great work @Dbrant, thanks for delivering on this promise https://phabricator.wikimedia.org/T201597#7387956

At https://meta.wikimedia.org/wiki/Tech#Pop-up_notices_on_mobile_versions_of_Wikipedia:_Possible?, User:Al12si is reporting that a fresh install of the Android app circa 2022-10-18 does not include edit notices. Is this a regression, a removed feature, a feature tha never made it to general release, or something that needs more information to be determined?

Hi @Al12si,
It is true that the mobile site does not show editnotices. Please see T201595 for the corresponding task and conversation.

As for the Android app, we do show editnotices, but only those that are exposed by VisualEditor. Since there is no official API for getting editnotices (T45683), we make use of the visualeditor API which provides editnotices along with other metadata, but it omits certain specific notices, one of which happens to be the BLP notice (T56029). Once that is fixed, the BLP notice will be shown in the app automatically.