IceCubesApp icon indicating copy to clipboard operation
IceCubesApp copied to clipboard

Make text on Status Detail view selectable

Open btylerh7 opened this issue 2 years ago • 5 comments

Long pressing on the text in the StatusDetailView opens up the context menu. Since there is already a button next to the post that opens the context menu, I think it would be useful to have the text be selectable in this view.

Would this be easy to implement? I'm still relatively new to SwiftUI, so I'm not sure what exactly would need to be done.

Just as a clarification, this would be only in the detail view, not in the timeline view. I think the timeline view should have the context menu in case people have the action buttons hidden.

btylerh7 avatar Jan 19 '23 04:01 btylerh7

Yeah, I regularly want to copy text from someone's toot (e.g. shell command, for a quote, etc) - but that's impossible right now. So this would be very handy!

KSDaemon avatar Jan 23 '24 11:01 KSDaemon

It's already implemented, but lives under the "Select Text" menu.

thai-d-v avatar Jan 23 '24 12:01 thai-d-v

Ou! @thai-d-v thnx for pointing! That is great, but going through the context menu → additional window → select text → then closing that popup window - may be not always convenient and is a pretty long way. Selecting the text with the mouse and related cursor is the common UX pattern for users. So it would be cool to implement the same approach here.

P.S. Sorry, I'm not a SwiftUI guru, and I don't know is it hard or easy. In most of the other UI frameworks that is pretty quick. But that might not be so here.

KSDaemon avatar Jan 23 '24 13:01 KSDaemon

I haven't done any SwiftUI in a little bit now (switched to Android last fall) so it might be better with iOS 17, but in my experience it's actually pretty hard to get the selectable text. I wound up having to use the UIKit text view instead to get the functionality in my own apps.

btylerh7 avatar Jan 24 '24 12:01 btylerh7

@btylerh7 is it possible to change the type of the text-holding UI component to something text-selectable like textarea (in other techs) or style the text input (like removing borders and making it read-only)?

KSDaemon avatar Jan 24 '24 12:01 KSDaemon