From a7679f63752da16bdf3cad73012f03739e4929bc Mon Sep 17 00:00:00 2001 From: mdshamoon Date: Fri, 26 Aug 2022 17:11:12 +0530 Subject: [PATCH 1/2] updated floweditor --- package.json | 2 +- .../ChatConversation/ChatConversation.tsx | 3 +++ yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 64b861cd4..a0ac357b0 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "@date-io/date-fns": "^1.x", "@draft-js-plugins/editor": "^4.1.2", "@draft-js-plugins/mention": "^5.1.1", - "@glific/flow-editor": "^1.17.1-4", + "@glific/flow-editor": "^1.17.1-7", "@jumpn/utils-graphql": "^0.6.0", "@material-ui/core": "^4.11.3", "@material-ui/icons": "^4.11.2", diff --git a/src/containers/Chat/ChatConversations/ChatConversation/ChatConversation.tsx b/src/containers/Chat/ChatConversations/ChatConversation/ChatConversation.tsx index c4826778b..038bdf7a5 100644 --- a/src/containers/Chat/ChatConversations/ChatConversation/ChatConversation.tsx +++ b/src/containers/Chat/ChatConversations/ChatConversation/ChatConversation.tsx @@ -172,6 +172,9 @@ const ChatConversation: React.SFC = (props) => { if (originalText.length > COMPACT_MESSAGE_LENGTH) { originalText = originalText.slice(0, COMPACT_MESSAGE_LENGTH).concat('...'); } + // replace new line characters with space to come in same line + originalText = originalText.replace(/\n/g, ' '); + displayMSG = WhatsAppToJsx(originalText); } diff --git a/yarn.lock b/yarn.lock index 721f798cc..e4c759379 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1344,10 +1344,10 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== -"@glific/flow-editor@^1.17.1-4": - version "1.17.1-4" - resolved "https://registry.yarnpkg.com/@glific/flow-editor/-/flow-editor-1.17.1-4.tgz#54e1af5aaf5a5f59b75cfff72b6372bde27e3b80" - integrity sha512-ms4a/oxvEl5iSfrmZigwSx87DiyDxlgcfhCmBGR9Mh/ssb8BYjX46cLvxQ0TErkiIOfB9uES/cJqbc4fqCTxww== +"@glific/flow-editor@^1.17.1-7": + version "1.17.1-7" + resolved "https://registry.yarnpkg.com/@glific/flow-editor/-/flow-editor-1.17.1-7.tgz#b0a87912cd11ee2bc9fb3f7d01978e78039d74c0" + integrity sha512-hexaBa4hSr6Ph1UAOyhXuetWVj5hikE+LkV5NXdSBUCY2kCiOEF9ng6hiDTwgEw6apkDi5t020/b8+rYtwIY3Q== dependencies: react "^16.8.6" react-dom "^16.8.6" From c63fd8d665e66d14ca2abc1e56a141ccd60290d8 Mon Sep 17 00:00:00 2001 From: mdshamoon Date: Fri, 26 Aug 2022 19:22:34 +0530 Subject: [PATCH 2/2] updated package --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a0ac357b0..376ef95d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "glific-frontend", - "version": "3.9.2", + "version": "3.9.3", "private": true, "dependencies": { "@absinthe/socket": "^0.2.1",