Page MenuHomePhabricator

mobile-html - Article UI - [Dev] - Restore Article links 3D touch functionality
Closed, ResolvedPublic

Description

See title.

Event Timeline

I would like to take on this task. But as far as I tested, 3D touch in Feed tab and in the explore tab seems to work. @Tsevener could you elaborate on concrete todos or provide steps to reproduce the problem?

Hi @yzelenska - apologies for the limited task description. This one isn't a bug, this is for restoring the contextual menus feature (for iOS13, peek & pop for iOS 12 & 11) when force pressing a link inside of an article. You'll only be able to repro in our develop branch, where our new
ArticleViewController.swift is used. We are in the middle of rewriting our article view controller (from WMFArticleViewController.m to ArticleViewController.swift) to be released in our upcoming 6.6 release. This is a larger task than just a bug fix would be, but if you're still interested here are a couple of links that might be good to reference when doing this work:

Phab task for adding iOS13 contextual menus: https://phabricator.wikimedia.org/T235918
Old PR for adding iOS13 contextual menus: https://github.com/wikimedia/wikipedia-ios/pull/3304
Old follow-on crash fix from previous PR: https://github.com/wikimedia/wikipedia-ios/pull/3317

You can checkout our git tag releases/6.5.1 to get the current AppStore version of the codebase to reference WMFArticleViewController.m. You can hopefully continue to use ArticlePeekPreviewViewController.swift for displaying the peek view, it still exists in our develop branch. You will need to add the presentation logic in ArticleViewController.swift for displaying ArticlePeekPreviewViewController.swift when a link is force pressed. To fit our current pattern it might be best if you add that logic in a separate ArticleViewController extension & file, such as ArticleViewController+Menus.swift.

Also note this is something we will need done in the next week, so if you don't think you can finish it by then please don't pick it up - we can take it on later this week. Thank you!

IMG_5253.PNG (2×1 px, 2 MB)