From 1169149b83af2793bf50ad9e42db397fd512ae02 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 27 Jan 2023 12:36:49 -0600 Subject: [PATCH] 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 = ({ )} - +