fix(location): wrap long MSC3488 descriptions
Constrain the rendered location description width and break long tokens so an oversized description from another client can't overflow the message bubble. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -555,7 +555,11 @@ export function MLocation({ content }: MLocationProps) {
|
|||||||
loading="lazy"
|
loading="lazy"
|
||||||
sandbox="allow-scripts"
|
sandbox="allow-scripts"
|
||||||
/>
|
/>
|
||||||
{description && <Text size="T300">{description}</Text>}
|
{description && (
|
||||||
|
<Text size="T300" style={{ wordBreak: 'break-word', maxWidth: '280px' }}>
|
||||||
|
{description}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
<Text size="T300" priority="300">
|
<Text size="T300" priority="300">
|
||||||
{`${lat.toFixed(5)}, ${lon.toFixed(5)}`}
|
{`${lat.toFixed(5)}, ${lon.toFixed(5)}`}
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
Reference in New Issue
Block a user