From 44c62bf511d7863ccbfc79191aa7e50d4976c4e1 Mon Sep 17 00:00:00 2001 From: Rajat Parashar <parasharrajat@users.noreply.github.com> Date: Fri, 6 Aug 2021 21:29:47 +0530 Subject: [PATCH 1/2] fix: message alignment --- src/styles/styles.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/styles/styles.js b/src/styles/styles.js index 31d8103e433f..d82277867063 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1900,10 +1900,6 @@ const webViewStyles = { // styles from the renderer, just pass the "style" prop to the underlying // component. tagStyles: { - body: { - flexDirection: 'row', - }, - em: { fontFamily: fontFamily.GTA_ITALIC, fontStyle: 'italic', From a5a0b8e6c5af7b3efaf27d09091c78270d8ac53d Mon Sep 17 00:00:00 2001 From: Rajat Parashar <parasharrajat@users.noreply.github.com> Date: Sun, 8 Aug 2021 00:32:15 +0530 Subject: [PATCH 2/2] fix: alignment without breaking other layout --- .../InlineCodeBlock/index.native.js | 22 +++++++++++-------- src/components/RenderHTML/BaseRenderHTML.js | 1 + src/styles/styles.js | 1 - 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/components/InlineCodeBlock/index.native.js b/src/components/InlineCodeBlock/index.native.js index b8f71b680a4f..621247f68cce 100644 --- a/src/components/InlineCodeBlock/index.native.js +++ b/src/components/InlineCodeBlock/index.native.js @@ -4,21 +4,25 @@ import WrappedText from './WrappedText'; import inlineCodeBlockPropTypes from './inlineCodeBlockPropTypes'; const InlineCodeBlock = ({ + TDefaultRenderer, defaultRendererProps, boxModelStyle, textStyle, }) => ( - <WrappedText - textStyles={[textStyle]} - wordStyles={[ - boxModelStyle, - styles.codeWordStyle, - ]} - // eslint-disable-next-line react/jsx-props-no-spreading + <TDefaultRenderer + // eslint-disable-next-line react/jsx-props-no-spreading {...defaultRendererProps} > - {defaultRendererProps.tnode.data} - </WrappedText> + <WrappedText + textStyles={[textStyle]} + wordStyles={[ + boxModelStyle, + styles.codeWordStyle, + ]} + > + {defaultRendererProps.tnode.data} + </WrappedText> + </TDefaultRenderer> ); InlineCodeBlock.propTypes = inlineCodeBlockPropTypes; diff --git a/src/components/RenderHTML/BaseRenderHTML.js b/src/components/RenderHTML/BaseRenderHTML.js index dcf7fbe53958..42058198ced7 100755 --- a/src/components/RenderHTML/BaseRenderHTML.js +++ b/src/components/RenderHTML/BaseRenderHTML.js @@ -227,6 +227,7 @@ const BaseRenderHTML = ({html, debug, textSelectable}) => { return ( <HTML defaultTextProps={{selectable: textSelectable}} + defaultViewProps={{style: {alignItems: 'flex-start'}}} customHTMLElementModels={customHTMLElementModels} renderers={renderers} renderersProps={renderersProps} diff --git a/src/styles/styles.js b/src/styles/styles.js index d82277867063..f4a91d1784a3 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -1965,7 +1965,6 @@ const webViewStyles = { lineHeight: variables.fontSizeNormalHeight, fontFamily: fontFamily.GTA, flex: 1, - alignSelf: 'flex-start', }, };