Merge branch 'status-font-size' into 'develop'
Increase font size of focused status in threads See merge request soapbox-pub/soapbox!2232
This commit is contained in:
commit
cfd3ea9467
3 changed files with 17 additions and 2 deletions
|
@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Changed
|
### Changed
|
||||||
- Chats: improved display of media attachments.
|
- Chats: improved display of media attachments.
|
||||||
- ServiceWorker: switch to a network-first strategy. The "An update is available!" prompt goes away.
|
- 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
|
### Fixed
|
||||||
- Chats: media attachments rendering at the wrong size and/or causing the chat to scroll on load.
|
- Chats: media attachments rendering at the wrong size and/or causing the chat to scroll on load.
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { isRtl } from '../rtl';
|
||||||
import Markup from './markup';
|
import Markup from './markup';
|
||||||
import Poll from './polls/poll';
|
import Poll from './polls/poll';
|
||||||
|
|
||||||
|
import type { Sizes } from 'soapbox/components/ui/text/text';
|
||||||
import type { Status, Mention } from 'soapbox/types/entities';
|
import type { Status, Mention } from 'soapbox/types/entities';
|
||||||
|
|
||||||
const MAX_HEIGHT = 642; // 20px * 32 (+ 2px padding at the top)
|
const MAX_HEIGHT = 642; // 20px * 32 (+ 2px padding at the top)
|
||||||
|
@ -35,10 +36,17 @@ interface IStatusContent {
|
||||||
onClick?: () => void,
|
onClick?: () => void,
|
||||||
collapsable?: boolean,
|
collapsable?: boolean,
|
||||||
translatable?: boolean,
|
translatable?: boolean,
|
||||||
|
textSize?: Sizes,
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Renders the text content of a status */
|
/** Renders the text content of a status */
|
||||||
const StatusContent: React.FC<IStatusContent> = ({ status, onClick, collapsable = false, translatable }) => {
|
const StatusContent: React.FC<IStatusContent> = ({
|
||||||
|
status,
|
||||||
|
onClick,
|
||||||
|
collapsable = false,
|
||||||
|
translatable,
|
||||||
|
textSize = 'md',
|
||||||
|
}) => {
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
const [collapsed, setCollapsed] = useState(false);
|
const [collapsed, setCollapsed] = useState(false);
|
||||||
|
@ -162,6 +170,7 @@ const StatusContent: React.FC<IStatusContent> = ({ status, onClick, collapsable
|
||||||
direction={direction}
|
direction={direction}
|
||||||
dangerouslySetInnerHTML={content}
|
dangerouslySetInnerHTML={content}
|
||||||
lang={status.language || undefined}
|
lang={status.language || undefined}
|
||||||
|
size={textSize}
|
||||||
/>,
|
/>,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -187,6 +196,7 @@ const StatusContent: React.FC<IStatusContent> = ({ status, onClick, collapsable
|
||||||
direction={direction}
|
direction={direction}
|
||||||
dangerouslySetInnerHTML={content}
|
dangerouslySetInnerHTML={content}
|
||||||
lang={status.language || undefined}
|
lang={status.language || undefined}
|
||||||
|
size={textSize}
|
||||||
/>,
|
/>,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,11 @@ const DetailedStatus: React.FC<IDetailedStatus> = ({
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Stack space={4}>
|
<Stack space={4}>
|
||||||
<StatusContent status={actualStatus} translatable />
|
<StatusContent
|
||||||
|
status={actualStatus}
|
||||||
|
textSize='lg'
|
||||||
|
translatable
|
||||||
|
/>
|
||||||
|
|
||||||
<TranslateButton status={actualStatus} />
|
<TranslateButton status={actualStatus} />
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue