From 3c5fb52d81827db63742ec75e7574f2e88ab1e93 Mon Sep 17 00:00:00 2001 From: Alfonso Grillo Date: Wed, 19 Oct 2022 14:43:03 +0200 Subject: [PATCH 1/3] Remove clips to bounds for text views inside bubbles --- .../Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m b/Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m index 13eac3bcc..1b39e9822 100644 --- a/Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m +++ b/Riot/Modules/Room/TimelineCells/Common/MXKRoomBubbleTableViewCell.m @@ -237,6 +237,7 @@ static BOOL _disableLongPressGestureOnEvent; [tapGesture setDelegate:self]; [self.messageTextView addGestureRecognizer:tapGesture]; self.messageTextView.userInteractionEnabled = YES; + self.messageTextView.clipsToBounds = NO; // Recognise and make tappable phone numbers, address, etc. self.messageTextView.dataDetectorTypes = UIDataDetectorTypeAll; From 26007be20e381013b5255831b4b04771be1afbe9 Mon Sep 17 00:00:00 2001 From: Alfonso Grillo Date: Wed, 19 Oct 2022 14:43:30 +0200 Subject: [PATCH 2/3] Improve http url interaction ux --- Riot/Modules/Room/RoomViewController.m | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index a1c520302..0babf1de8 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -4565,6 +4565,9 @@ static CGSize kThreadListBarButtonItemImageSize; // Do nothing for dummy links shouldDoAction = NO; break; + case RoomMessageURLTypeHttp: + shouldDoAction = YES; + break; default: { MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey]; @@ -4590,16 +4593,20 @@ static CGSize kThreadListBarButtonItemImageSize; break; case UITextItemInteractionPresentActions: { - // Retrieve the tapped event - MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey]; - - if (tappedEvent) - { - // Long press on link, present room contextual menu. - [self showContextualMenuForEvent:tappedEvent fromSingleTapGesture:NO cell:cell animated:YES]; + if (roomMessageURLType == RoomMessageURLTypeHttp) { + shouldDoAction = YES; + } else { + // Retrieve the tapped event + MXEvent *tappedEvent = userInfo[kMXKRoomBubbleCellEventKey]; + + if (tappedEvent) + { + // Long press on link, present room contextual menu. + [self showContextualMenuForEvent:tappedEvent fromSingleTapGesture:NO cell:cell animated:YES]; + } + + shouldDoAction = NO; } - - shouldDoAction = NO; } break; case UITextItemInteractionPreview: From bda09a18f389e38edfb6d3c9e9e0bd91555217d1 Mon Sep 17 00:00:00 2001 From: Alfonso Grillo Date: Wed, 19 Oct 2022 14:48:39 +0200 Subject: [PATCH 3/3] Add changelog.d file --- changelog.d/pr-6936.change | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/pr-6936.change diff --git a/changelog.d/pr-6936.change b/changelog.d/pr-6936.change new file mode 100644 index 000000000..d1e649c9f --- /dev/null +++ b/changelog.d/pr-6936.change @@ -0,0 +1 @@ +Improves external links interaction UX.