Trim profile descriptions in profile screen and ProfileCard

Adds .trim() to profile descriptions to remove leading/trailing
whitespace that can cause layout issues in the UI.
This commit is contained in:
Claude
2026-01-11 12:45:26 +00:00
parent c540dae4e7
commit 27be15f80b
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -409,7 +409,7 @@ export function Description({
const profile = useProfileShadow(profileUnshadowed)
const rt = useMemo(() => {
if (!('description' in profile)) return
const rt = new RichTextApi({text: profile.description || ''})
const rt = new RichTextApi({text: (profile.description || '').trim()})
rt.detectFacetsWithoutResolution()
return rt
}, [profile])
+1 -1
View File
@@ -203,7 +203,7 @@ function ProfileScreenLoaded({
useSetTitle(combinedDisplayName(profile))
const description = profile.description ?? ''
const description = (profile.description ?? '').trim()
const hasDescription = description !== ''
const [descriptionRT, isResolvingDescriptionRT] = useRichText(description)
const showPlaceholder = isPlaceholderProfile || isResolvingDescriptionRT