diff --git a/app/components/markdown/markdown.tsx b/app/components/markdown/markdown.tsx index 043709715..d0aa6611d 100644 --- a/app/components/markdown/markdown.tsx +++ b/app/components/markdown/markdown.tsx @@ -39,7 +39,6 @@ import type { type MarkdownProps = { autolinkedUrlSchemes?: string[]; baseTextStyle: StyleProp; - baseParagraphStyle?: StyleProp; blockStyles?: MarkdownBlockStyles; channelId?: string; channelMentions?: ChannelMentions; @@ -86,7 +85,7 @@ const getStyleSheet = makeStyleSheetFromTheme((theme) => { return { block: { - alignItems: 'flex-start', + alignItems: 'center', flexDirection: 'row', flexWrap: 'wrap', }, @@ -129,7 +128,7 @@ const Markdown = ({ enableInlineLatex, enableLatex, imagesMetadata, isEdited, isReplyPost, isSearchResult, layoutHeight, layoutWidth, location, mentionKeys, minimumHashtagLength = 3, onPostPress, postId, searchPatterns, - textStyles = {}, theme, value = '', baseParagraphStyle, + textStyles = {}, theme, value = '', }: MarkdownProps) => { const style = getStyleSheet(theme); const managedConfig = useManagedConfig(); @@ -384,13 +383,11 @@ const Markdown = ({ } return ( - - - + ); }; @@ -443,9 +440,7 @@ const Markdown = ({ style={blockStyle} testID='markdown_paragraph' > - - {children} - + {children} ); }; diff --git a/app/components/markdown/markdown_latex_inline/index.tsx b/app/components/markdown/markdown_latex_inline/index.tsx index be7e6a697..0f6fb7af4 100644 --- a/app/components/markdown/markdown_latex_inline/index.tsx +++ b/app/components/markdown/markdown_latex_inline/index.tsx @@ -3,7 +3,7 @@ import React from 'react'; import {useIntl} from 'react-intl'; -import {Platform, Text, View} from 'react-native'; +import {Text, View} from 'react-native'; import MathView from 'react-native-math-view'; import ErrorBoundary from '@components/markdown/error_boundary'; @@ -23,7 +23,6 @@ type MathViewErrorProps = { const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => { return { mathStyle: { - marginBottom: Platform.select({default: -10, ios: 2.5}), color: theme.centerChannelColor, }, viewStyle: { diff --git a/app/components/post_list/post/system_message/__snapshots__/system_message_helpers.test.js.snap b/app/components/post_list/post/system_message/__snapshots__/system_message_helpers.test.js.snap index 8d4456556..a380fc3aa 100644 --- a/app/components/post_list/post/system_message/__snapshots__/system_message_helpers.test.js.snap +++ b/app/components/post_list/post/system_message/__snapshots__/system_message_helpers.test.js.snap @@ -12,7 +12,7 @@ exports[`renderSystemMessage uses renderer for Channel Display Name update 1`] = style={ [ { - "alignItems": "flex-start", + "alignItems": "center", "flexDirection": "row", "flexWrap": "wrap", }, @@ -20,45 +20,43 @@ exports[`renderSystemMessage uses renderer for Channel Display Name update 1`] = } testID="markdown_paragraph" > - - - - @username - - - + - updated the channel display name from: old displayname to: new displayname + @username + + updated the channel display name from: old displayname to: new displayname + `; @@ -75,7 +73,7 @@ exports[`renderSystemMessage uses renderer for Channel Header update 1`] = ` style={ [ { - "alignItems": "flex-start", + "alignItems": "center", "flexDirection": "row", "flexWrap": "wrap", }, @@ -83,45 +81,43 @@ exports[`renderSystemMessage uses renderer for Channel Header update 1`] = ` } testID="markdown_paragraph" > - - - - @username - - - + - updated the channel header from: old header to: new header + @username + + updated the channel header from: old header to: new header + `; @@ -154,7 +150,7 @@ exports[`renderSystemMessage uses renderer for Guest added and join to channel 1 style={ [ { - "alignItems": "flex-start", + "alignItems": "center", "flexDirection": "row", "flexWrap": "wrap", }, @@ -162,45 +158,43 @@ exports[`renderSystemMessage uses renderer for Guest added and join to channel 1 } testID="markdown_paragraph" > - - - - @username - - - + - joined the channel as a guest. + @username + + joined the channel as a guest. + `; @@ -217,7 +211,7 @@ exports[`renderSystemMessage uses renderer for Guest added and join to channel 2 style={ [ { - "alignItems": "flex-start", + "alignItems": "center", "flexDirection": "row", "flexWrap": "wrap", }, @@ -225,65 +219,63 @@ exports[`renderSystemMessage uses renderer for Guest added and join to channel 2 } testID="markdown_paragraph" > - - - - @other.user - - - - added to the channel as a guest by - + }, + { + "opacity": 1, + }, + ] + } + > - - @username. - + @other.user + + + + added to the channel as a guest by + + + + @username. @@ -302,7 +294,7 @@ exports[`renderSystemMessage uses renderer for OLD archived channel without a us style={ [ { - "alignItems": "flex-start", + "alignItems": "center", "flexDirection": "row", "flexWrap": "wrap", }, @@ -310,22 +302,20 @@ exports[`renderSystemMessage uses renderer for OLD archived channel without a us } testID="markdown_paragraph" > - - - archived the channel - + } + testID="markdown_text" + > + archived the channel @@ -343,7 +333,7 @@ exports[`renderSystemMessage uses renderer for archived channel 1`] = ` style={ [ { - "alignItems": "flex-start", + "alignItems": "center", "flexDirection": "row", "flexWrap": "wrap", }, @@ -351,45 +341,43 @@ exports[`renderSystemMessage uses renderer for archived channel 1`] = ` } testID="markdown_paragraph" > - - - - @username - - - + - archived the channel + @username + + archived the channel + `; @@ -406,7 +394,7 @@ exports[`renderSystemMessage uses renderer for unarchived channel 1`] = ` style={ [ { - "alignItems": "flex-start", + "alignItems": "center", "flexDirection": "row", "flexWrap": "wrap", }, @@ -414,45 +402,43 @@ exports[`renderSystemMessage uses renderer for unarchived channel 1`] = ` } testID="markdown_paragraph" > - - - - @username - - - + - unarchived the channel + @username + + unarchived the channel + `; diff --git a/app/screens/permalink/permalink_error.tsx b/app/screens/permalink/permalink_error.tsx index f0eea6939..052f6f93a 100644 --- a/app/screens/permalink/permalink_error.tsx +++ b/app/screens/permalink/permalink_error.tsx @@ -42,9 +42,6 @@ const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => { color: theme.centerChannelColor, ...typography('Body', 200, 'Regular'), }, - errorTextParagraph: { - textAlign: 'center', - }, errorButtonContainer: { borderTopWidth: 1, borderTopColor: changeOpacity(theme.centerChannelColor, 0.16), @@ -131,7 +128,6 @@ function PermalinkError({ theme={theme} value={text} baseTextStyle={style.errorText} - baseParagraphStyle={style.errorTextParagraph} disableAtMentions={true} disableAtChannelMentionHighlight={true} disableChannelLink={true} diff --git a/app/utils/markdown/index.ts b/app/utils/markdown/index.ts index ca0d283d5..31b7a24a5 100644 --- a/app/utils/markdown/index.ts +++ b/app/utils/markdown/index.ts @@ -30,6 +30,7 @@ export const getMarkdownTextStyles = makeStyleSheetFromTheme((theme: Theme) => { }, strong: { fontFamily: 'OpenSans-SemiBold', + fontWeight: '600', }, del: { textDecorationLine: 'line-through',