From c49f8374320b3cd94ac0f25e5f83ff5e543c435d Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Thu, 18 Mar 2021 11:45:00 -0300 Subject: [PATCH] Revert "[FIX] Attachment not rendering markdown (#2924)" This reverts commit 2ea7e9d3f9bc21fef14d13473c3dd5e2cb205c03. --- .../__snapshots__/Storyshots.test.js.snap | 306 ++---------------- app/containers/message/Reply.js | 21 +- storybook/stories/Message.js | 6 +- 3 files changed, 26 insertions(+), 307 deletions(-) diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index 84c23537a6..be964795e3 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -39301,44 +39301,17 @@ exports[`Storyshots Message list message 1`] = ` Object { "backgroundColor": "transparent", "fontFamily": "System", - "fontSize": 16, + "fontSize": 14, "fontWeight": "400", "textAlign": "left", }, - undefined, Object { "color": "#2f343d", }, ] } > - - Value 1 - + Value 1 - - Value 2 - + Value 2 - - Value 3 - + Value 3 - - Value 4 - + Value 4 - - Value 5 - + Value 5 @@ -39676,7 +39541,7 @@ exports[`Storyshots Message list message 1`] = ` ] } > - Two short custom fields with markdown + Two short custom fields - - Value 1 - + Value 1 - - - Value 2 - - + Value 2 @@ -40402,44 +40191,17 @@ exports[`Storyshots Message list message 1`] = ` Object { "backgroundColor": "transparent", "fontFamily": "System", - "fontSize": 16, + "fontSize": 14, "fontWeight": "400", "textAlign": "left", }, - undefined, Object { "color": "#2f343d", }, ] } > - - Value 1 - + Value 1 - - Value 2 - + Value 2 diff --git a/app/containers/message/Reply.js b/app/containers/message/Reply.js index caa80039a7..d05668ddbd 100644 --- a/app/containers/message/Reply.js +++ b/app/containers/message/Reply.js @@ -112,24 +112,16 @@ const Description = React.memo(({ return true; }); -const Fields = React.memo(({ attachment, theme, getCustomEmoji }) => { +const Fields = React.memo(({ attachment, theme }) => { if (!attachment.fields) { return null; } - - const { baseUrl, user } = useContext(MessageContext); return ( {attachment.fields.map(field => ( {field.title} - + {field.value} ))} @@ -184,11 +176,7 @@ const Reply = React.memo(({ getCustomEmoji={getCustomEmoji} theme={theme} /> - + { }]} /> - + { short: true }, { title: 'Field 2', - value: '[Value 2](https://google.com/)', + value: 'Value 2', short: true }] }, { @@ -734,7 +734,7 @@ export default ({ theme }) => { short: true }, { title: 'Field 2', - value: '**Value 2**', + value: 'Value 2', short: true }] }]}