forem / DEV-ios

DEV Community iOS App
GNU General Public License v3.0
357 stars 97 forks source link

Discussion on whether link previews should be enabled #184

Open warpskew opened 4 years ago

warpskew commented 4 years ago

I was testing the iOS application on an iPhone 11 Pro Max simulator and noticed that if I press down on a link with 3D Touch (e.g. #javascript under the "Top 100 Tags" section of the app), the system link preview is displayed. Seeing as users should feel like they're having a native experience, I thought It'd be good to open a discussion on this since the link previews allow a user to navigate away from the app into Safari.

To Reproduce

  1. Run app in simulator
  2. Open app
  3. Press down on any post with 3D Touch
  4. Press Open Link option

Expected behavior

I think there may be certain cases where link previews should be supported, but I'm not sure where. I'm not sure if phone numbers or addresses are available in the app, but these may be affected if the link preview feature is turned off.

Screenshots

Simulator Screen Shot - iPhone 11 Pro Max - 2019-10-15 at 15 33 44 Simulator Screen Shot - iPhone 11 Pro Max - 2019-10-15 at 15 33 51

Smartphone (please complete the following information):

Additional context There is a property available on web views which disables link previews, but it seems it's a coarse solution: https://developer.apple.com/documentation/webkit/wkwebview/1415000-allowslinkpreview