From 24cb79e4579b6fe9c7a7337e0f3f4fe34b4d447a Mon Sep 17 00:00:00 2001 From: Shane Smith Date: Mon, 23 Nov 2026 18:24:24 +1030 Subject: [PATCH] fix: wrap long profile locations instead of letting them overflow the page --- resources/js/components/bio-text.tsx | 5 +++-- resources/js/pages/organization/show.tsx | 8 +++++--- resources/js/pages/user/show.tsx | 14 ++++++++------ tests/Unit/BioText.test.tsx | 16 ++++++++++++++++ 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/resources/js/components/bio-text.tsx b/resources/js/components/bio-text.tsx index 6c715ea9b..aa8678258 100644 --- a/resources/js/components/bio-text.tsx +++ b/resources/js/components/bio-text.tsx @@ -4,7 +4,7 @@ import { mentionPattern } from '@/lib/mentions'; import { show } from '@/routes/user'; const mentionClassName = - 'inline-flex h-[1.55em] items-center gap-[0.3em] rounded-md border bg-muted pr-[0.55em] pl-[calc(0.2em-1px)] align-[-0.3em] text-[0.93em] font-medium whitespace-nowrap text-foreground transition-colors hover:border-primary/45 hover:bg-primary-soft hover:text-primary-hover'; + 'inline-flex h-[1.55em] max-w-full items-center gap-[0.3em] rounded-md border bg-muted pr-[0.55em] pl-[calc(0.2em-1px)] align-[-0.3em] text-[0.93em] font-medium whitespace-nowrap text-foreground transition-colors hover:border-primary/45 hover:bg-primary-soft hover:text-primary-hover'; // Like a shortened URL, the "@" stays in the text, so copying the bio keeps the mention. function MentionContent({ handle }: { handle: string }) { @@ -21,7 +21,8 @@ function MentionContent({ handle }: { handle: string }) { className="size-full" /> - + {/* A handle wider than its column, as GitHub allows 39 characters, ends in an ellipsis instead of overflowing. */} + @ {handle} diff --git a/resources/js/pages/organization/show.tsx b/resources/js/pages/organization/show.tsx index c0acd0801..48fb05093 100644 --- a/resources/js/pages/organization/show.tsx +++ b/resources/js/pages/organization/show.tsx @@ -128,9 +128,11 @@ export default function Show({