From 1169149b83af2793bf50ad9e42db397fd512ae02 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 27 Jan 2023 12:36:49 -0600 Subject: [PATCH 1/2] Increase font size of focused status in threads --- CHANGELOG.md | 1 + app/soapbox/components/status-content.tsx | 12 +++++++++++- .../features/status/components/detailed-status.tsx | 6 +++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd318039b..b5b4392bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Chats: improved display of media attachments. - ServiceWorker: switch to a network-first strategy. The "An update is available!" prompt goes away. +- Posts: increased font size of focused status in threads. ### Fixed - Chats: media attachments rendering at the wrong size and/or causing the chat to scroll on load. diff --git a/app/soapbox/components/status-content.tsx b/app/soapbox/components/status-content.tsx index 23a688ed5..6cabe9d99 100644 --- a/app/soapbox/components/status-content.tsx +++ b/app/soapbox/components/status-content.tsx @@ -13,6 +13,7 @@ import { isRtl } from '../rtl'; import Markup from './markup'; import Poll from './polls/poll'; +import type { Sizes } from 'soapbox/components/ui/text/text'; import type { Status, Mention } from 'soapbox/types/entities'; const MAX_HEIGHT = 642; // 20px * 32 (+ 2px padding at the top) @@ -35,10 +36,17 @@ interface IStatusContent { onClick?: () => void, collapsable?: boolean, translatable?: boolean, + size?: Sizes, } /** Renders the text content of a status */ -const StatusContent: React.FC = ({ status, onClick, collapsable = false, translatable }) => { +const StatusContent: React.FC = ({ + status, + onClick, + collapsable = false, + translatable, + size = 'md', +}) => { const history = useHistory(); const [collapsed, setCollapsed] = useState(false); @@ -162,6 +170,7 @@ const StatusContent: React.FC = ({ status, onClick, collapsable direction={direction} dangerouslySetInnerHTML={content} lang={status.language || undefined} + size={size} />, ]; @@ -187,6 +196,7 @@ const StatusContent: React.FC = ({ status, onClick, collapsable direction={direction} dangerouslySetInnerHTML={content} lang={status.language || undefined} + size={size} />, ]; diff --git a/app/soapbox/features/status/components/detailed-status.tsx b/app/soapbox/features/status/components/detailed-status.tsx index a0e0b0e39..f579587ea 100644 --- a/app/soapbox/features/status/components/detailed-status.tsx +++ b/app/soapbox/features/status/components/detailed-status.tsx @@ -109,7 +109,11 @@ const DetailedStatus: React.FC = ({ )} - + From 747cc8c5b9421f326bda24d5a89571947945f750 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 30 Jan 2023 13:38:29 -0600 Subject: [PATCH 2/2] StatusContent: size --> textSize --- app/soapbox/components/status-content.tsx | 8 ++++---- .../features/status/components/detailed-status.tsx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/soapbox/components/status-content.tsx b/app/soapbox/components/status-content.tsx index 6cabe9d99..307faf679 100644 --- a/app/soapbox/components/status-content.tsx +++ b/app/soapbox/components/status-content.tsx @@ -36,7 +36,7 @@ interface IStatusContent { onClick?: () => void, collapsable?: boolean, translatable?: boolean, - size?: Sizes, + textSize?: Sizes, } /** Renders the text content of a status */ @@ -45,7 +45,7 @@ const StatusContent: React.FC = ({ onClick, collapsable = false, translatable, - size = 'md', + textSize = 'md', }) => { const history = useHistory(); @@ -170,7 +170,7 @@ const StatusContent: React.FC = ({ direction={direction} dangerouslySetInnerHTML={content} lang={status.language || undefined} - size={size} + size={textSize} />, ]; @@ -196,7 +196,7 @@ const StatusContent: React.FC = ({ direction={direction} dangerouslySetInnerHTML={content} lang={status.language || undefined} - size={size} + size={textSize} />, ]; diff --git a/app/soapbox/features/status/components/detailed-status.tsx b/app/soapbox/features/status/components/detailed-status.tsx index f579587ea..96361a0f8 100644 --- a/app/soapbox/features/status/components/detailed-status.tsx +++ b/app/soapbox/features/status/components/detailed-status.tsx @@ -110,8 +110,8 @@ const DetailedStatus: React.FC = ({