pachli-android icon indicating copy to clipboard operation
pachli-android copied to clipboard

Long-press on hyperlinks should bring up a dialog

Open cbiere opened this issue 9 months ago • 5 comments

Tapping on a link opens the link in a browser immediately. Long-pressing a link has no effect.

Describe the solution you'd like I would expect a menu with different actions or the share action where I can decide to copy the link to the clipboard or send it to a specific app.

Describe alternatives you've considered A workaround is to tap on the link so that is opened in the browser and then copy it or share it from there. However, for various reasons I don't always want to open the link right away.

cbiere avatar May 11 '24 17:05 cbiere

You can select the text in posts, including links, but only after tapping that specific post to view it. Here's a vid:

https://github.com/pachli/pachli-android/assets/16272279/2a708f79-f040-464f-96f6-5b87444ca17b

But by contrast, you can tap links in posts to open them in your browser without having to first tap the post. I agree that it would make sense to align these behaviors: any place where you can tap a link to open it in your browser, you should also be able to also long-press links without having to first tap the post.

I just saw this same feature request (as a Mastodon post) from someone else recently, so this is definitely something we should improve. Thanks for filing the issue!

mileskrell avatar May 11 '24 18:05 mileskrell

Sure, you can do that after opening the post. Mark and copy is a very crude way to use links though and I strongly advise against it as it frequently causes butchered links. In my opinion, fairemail has the most laudable handling of links. It always brings up a dialog, warns about trackers, HTTP and offers using the default app or a custom one. Of course, you can turn this feature completly off, if you prefer. I guess that would be overkill in case of mastodon but I wanted to mention it anyway. Then again links on mastodon are not magically safer than links in emails. Also it's sometimes guesswork to tell what a tap in which place actually causes what action but this is kind of normal with mobile apps. I don't mean this as a rant.

cbiere avatar May 11 '24 19:05 cbiere

@cbiere, agreed - no rantiness taken 🙂

I think the experience when selecting links should be more like it is in other apps, meaning a dedicated context menu with at least an option to copy, but maybe also other options like share. I'm thinking of Firefox's behavior around links - you can select any text on a web page, but links get their own context menu on long-press. I haven't used fairemail but feel free to post a screenshot or recording if you feel it does an especially good job around this UI.

mileskrell avatar May 11 '24 20:05 mileskrell

Agreed the handling in Firefox is just fine (open/copy/share).

Fairemail is a bit of an acquired taste and somewhat overwhelming if not intimidating at first:

Screenshot_20240511-224259_FairEmail

Screenshot_20240511-224153_FairEmail

I don't agree with all its UX choices as it's a bit redundant and noisy but it's a great email client (if not the best on Android).

cbiere avatar May 11 '24 20:05 cbiere

Given that there's a "Do not ask again" checkbox, I'm guessing that FairEmail has this dialog appear whenever you tap a link? I think most people would expect tapping a link to directly open it via the default browser, and I think that's probably the best behavior to go with. It would make sense to have a dedicated menu on long-press, but I agree that this FairEmail menu feels kind of excessive. On the other hand, the integration with ipinfo.io does sound cool. Maybe we start by adding an open/copy/share menu like Firefox and then we could think about what other options would be beneficial? I want to have useful options, I just don't want it to end up too cluttered.

mileskrell avatar May 12 '24 00:05 mileskrell

This'll be implemented very shortly.

Long pressing a link (or a mention, or a hashtag) will show the normal Android "share sheet", with the link. From there you can copy it, or share it with any of the apps there.

In this screenshot I long-pressed on the link highlighted with the arrow:

nikclayton avatar Oct 24 '24 20:10 nikclayton