Skip to content

Conversation

sravan-s
Copy link
Contributor

@sravan-s sravan-s commented Jun 6, 2023

In Mobile,
Touch from contextMenus were getting leaked to MessageBody
To avoid this, move context menu outside of MessageBody's JSX

<div longPress>
	<Message />
	<Menu/>
</div>

to

<>
	<div longPress>
		<Message />
	</div>
	{
		<Menu/>
	}
</>

Bonus * OGMessage should fallback to text-messages

Fixes: https://sendbird.atlassian.net/browse/UIKIT-4029

* OGMessage should fallback to text-message
* Mobile ContextMenus should be outside TouchHandlers
@sravan-s sravan-s requested a review from HoonBaek June 6, 2023 14:33
@sravan-s sravan-s self-assigned this Jun 6, 2023
@sravan-s sravan-s requested a review from AhyoungRyu June 7, 2023 01:38
Comment on lines +20 to +28
type MessageTypeOptions = {
isOgMessageEnabledInOpenChannel?: boolean;
};

export const getMessageType = (
message: UserMessage | FileMessage | AdminMessage,
options?: MessageTypeOptions,
): string => {
const isOgMessageEnabledInOpenChannel = options?.isOgMessageEnabledInOpenChannel;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @AhyoungRyu , its better to fallback to text message when og message is not present

@sravan-s sravan-s merged commit de8db88 into main Jun 7, 2023
@sravan-s sravan-s deleted the fix/UIKIT-4029/open_channel_context branch June 7, 2023 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant