Page MenuHomePhabricator

[Android + iOS] Verify apps are able to follow the redirect returned by Special:GoToComment
Open, LowPublic

Description

DiscussionTools comment permalinks will be in the form of https://[site-url]/Special:GoToComment/[comment-id-or-name]. e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Special:GoToComment/c-84.54.255.103-20220815233000-ddd

Following this link will either redirect you to a page containing that comment (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/Talk:Lightbox_demo#c-84.54.255.103-20220815233000-ddd) or to a different page showing multiple pages that contain a comment with that name/id (https://en.wikipedia.beta.wmflabs.org/wiki/Special:FindComment/c-84.54.255.103-20220815233000-ddd).

We'd want the apps to verify that they can cope with this and (as appropriate) follow the redirect into their normal talk-page experience or show the special page.

Event Timeline

ppelberg renamed this task from [Android + iOS] Verify they are able to follow the redirect returned by Special:GoToComment to [Android + iOS] Verify apps are able to follow the redirect returned by Special:GoToComment.Aug 17 2022, 11:51 PM
ppelberg created this task.
ppelberg moved this task from Backlog to Existing Feature Improvements on the DiscussionTools board.

Thanks for filing this @ppelberg will keep an eye on it for when it would be ready

LGoto triaged this task as Low priority.Sep 27 2022, 6:46 PM
LGoto moved this task from Blocked or Waiting to Needs Acceptance Criteria on the ios-app-v7.0 board.

Hi Editing team (CC @JMcLeod_WMF) - will you still be doing this work? Please let us know so the apps teams can respond accordingly. Thanks!

Yeah. This feature is now live on several wikis and it's being released further (T315510). We're waiting for you to check what happens when one follows a link such as https://en.wikipedia.beta.wmflabs.org/wiki/Special:GoToComment/c-84.54.255.103-20220815233000-ddd in the apps (production wiki example: https://ca.wikipedia.org/wiki/Especial:GoToComment/c-Rauric-20230121190700-Pronom_feble). For example, if an email notification about a new comment used links like these, or if another user included a link like this in their talk page comment. Ideally, the links would open the app talk page interface, and scroll to or highlight the target comment, like they do on desktop.

Anthony mentioned it works on iOS but not on Android, so I am moving this for the Android engineers to check out when they get through some feature wrok

Hi @Tsevener

How does the iOS app handle the link which will redirect to the specific talk topic link with the comment anchor? Does the iOS read it and get the redirected URL in the app and then open the talk topic screen?

For now, the Android app will open an external browser after we detect the Special page link format is not supported; but for the regular URL (which is the talk page title with the comment anchor), the Android app can handle that.

@cooltey I tested our App Store version, and it looks like we do not push to our native talk page. It instead detects this as a link that can be opened as an in-app web view, and pushes there:

out.gif (960×444 px, 1 MB)

iOS also does not handle this type of link correctly:

https://ca.m.wikipedia.org/wiki/Discussi%C3%B3:Portada#c-Rauric-20230121190700-Pronom_feble

It does navigate to our native talk page, but we don't have logic to seek out a comment ID and scroll to it. We'll need to do client-side work for that.

@cooltey I tested our App Store version, and it looks like we do not push to our native talk page. It instead detects this as a link that can be opened as an in-app web view, and pushes there:

out.gif (960×444 px, 1 MB)

Thanks for checking that!
@JTannerWMF Should we create separate tickets for adding support for the Special:GoToComment page to open the native talk page?

Note that there are many other redirecting special pages like our Special:GoToComment – for example Special:Random, Special:MyPage, Special:Permalink/54321, Special:Redirect/page/54321. The apps can handle some (or maybe even all) of the target pages here. It might be nice to avoid special handling for GoToComment, and do something like a HEAD request first to check whether a special page would redirect, and then examine the target to see whether the app can display it or if it should open the browser.

The team talked through this and looking at all of the variations for special pages, we are getting into very hacky territory, so we are making the difficult decision to not support permalinks.