From b32e8a00a3ec55305ad5f974a1c2cae5a79a7a96 Mon Sep 17 00:00:00 2001 From: abhishek-01k Date: Mon, 14 Oct 2024 15:21:37 +0530 Subject: [PATCH 1/3] fix: fixed the theme for chat reply feature fixed the UI of the chat reply --- .../chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx b/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx index 9171fef7b..ac8ababe6 100644 --- a/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx @@ -155,15 +155,15 @@ export const ReplyCard = ({ - {`${replyPayloadManager.payload.fromDID?.split(':')[1].slice(0, 6)}...${replyPayloadManager.payload.fromDID + {`${replyPayloadManager.payload.fromDID ?.split(':')[1] - .slice(-6)}`} + .slice(0, 6)}...${replyPayloadManager.payload.fromDID?.split(':')[1].slice(-6)}`} - )} ); }; -const ReplySection = styled(Section) ` +const ReplySection = styled(Section)` border-left: 4px solid ${({ borderBG }) => borderBG || 'transparent'}; `; From a123764087240f17b092b26003a99f3a51b5ed3b Mon Sep 17 00:00:00 2001 From: abhishek-01k Date: Tue, 15 Oct 2024 15:18:53 +0530 Subject: [PATCH 2/3] fix: fixed the twitter preview Size issue --- .../cards/message/PreviewRenderer.tsx | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/message/PreviewRenderer.tsx b/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/message/PreviewRenderer.tsx index 3fa37a08d..3abcf6bdc 100644 --- a/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/message/PreviewRenderer.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/message/PreviewRenderer.tsx @@ -3,6 +3,7 @@ import { useEffect, useState } from 'react'; // External Packages import { TwitterTweetEmbed } from 'react-twitter-embed'; +import styled from 'styled-components'; // Internal Compoonents import { IFrame } from '../../../../../types'; @@ -11,9 +12,8 @@ import { checkTwitterUrl } from '../../../helpers/twitter'; import { FrameRenderer } from './FrameRenderer'; import { VideoRenderer } from './VideoRenderer'; - // Internal Configs - +import { device } from '../../../../../config/globals'; // Assets // Interfaces & Types @@ -149,6 +149,31 @@ export const PreviewRenderer = ({ frameData={initialized.frameData} /> ) : !initialized.loading && !initialized.error && initialized.url && initialized.urlType === 'twitter' ? ( - + + + ) : null; }; + +const TwitterEmbedWrapper = styled.div` + width: 100%; + max-width: 550px; + margin: 0 auto; + overflow: hidden; + padding: 0 10px; + > div { + max-width: 100% !important; + } + + iframe { + max-width: 100% !important; + } + + @media (max-width: ${device.mobileL}) { + max-width: 100%; + + iframe { + width: 100% !important; + } + } +`; From 050e2a16941d7e48fcc73c9c0f36f24a740e5c75 Mon Sep 17 00:00:00 2001 From: abhishek-01k Date: Wed, 16 Oct 2024 15:43:49 +0530 Subject: [PATCH 3/3] fix: modified the address for the reply preview --- .../chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx b/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx index ac8ababe6..cd4097825 100644 --- a/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx +++ b/packages/uiweb/src/lib/components/chat/ChatViewBubbleCore/cards/reply/ReplyCard.tsx @@ -17,6 +17,7 @@ import { CardRenderer } from '../../CardRenderer'; // Interfaces & Types import { IMessagePayload } from '../../../exportedTypes'; +import { pCAIP10ToWallet, shortenText } from '../../../../../helpers'; // Constants @@ -161,9 +162,7 @@ export const ReplyCard = ({ fontWeight="500" padding="0px" > - {`${replyPayloadManager.payload.fromDID - ?.split(':')[1] - .slice(0, 6)}...${replyPayloadManager.payload.fromDID?.split(':')[1].slice(-6)}`} + {shortenText(pCAIP10ToWallet(replyPayloadManager.payload.fromDID), 6, true)}