UX: Remove share as link fallback on touch devices (PR #9332)

Previously, there were three workflows when sharing a topic or a post:

  • sharing URL displayed in popup or modal, in an input or textarea element
  • native sharing dialog on touch devices with native sharing support
  • and a fallback to the URL displayed as link element on touch devices with no native sharing support

This PR removes the third option. We were only displaying this on non-iOS/non-Android touch devices like laptops with a touch screen, and it was buggy, see https://meta.discourse.org/t/user-experience-on-discourse-with-optional-touch-input/40190/24 for details.

GitHub

setInterval/setTimeout should never be used, we still have some in the codebase I think… but prefer Ember.run.later

Ember.run.later

happy to see this code gone :stuck_out_tongue:

This is minor, but I feel like I have to tell this. Given you now use later with 200ms in didInsert, there’s a possibility that a transition will be called before 200ms, destroying the element and making this block fail. You can try to add a longer later, and do a transition to see if the consequences are minor (just an error logged) or more problematic, if yes, you should ensure the element has been found.

Thanks @jjaffeux, the consequences were minor (only a console error logged) but I added the element check anyway.

1 Like