From 422aaec40cdae84f8b1b15e7e3ed54c9b4b4a72c Mon Sep 17 00:00:00 2001 From: Matilde Enevoldsen Date: Mon, 19 Oct 2026 21:57:03 +0100 Subject: [PATCH] fix: highlight links in profile bios --- KNOWLEDGE_BASE.md | 2 +- resources/js/components/profile-bio.tsx | 13 +++ resources/js/pages/user/show.tsx | 7 +- tests/Unit/ProfileBio.test.tsx | 100 ++++++++++++++++++++++++ tests/draft-images.config.ts | 1 + tests/tsconfig.json | 1 + 6 files changed, 118 insertions(+), 6 deletions(-) create mode 100644 resources/js/components/profile-bio.tsx create mode 100644 tests/Unit/ProfileBio.test.tsx diff --git a/KNOWLEDGE_BASE.md b/KNOWLEDGE_BASE.md index e6c9fe2cd9..7c8d9e00b9 100644 --- a/KNOWLEDGE_BASE.md +++ b/KNOWLEDGE_BASE.md @@ -92,7 +92,7 @@ Sources: [onboarding page](resources/js/pages/onboarding/show.tsx), [sign-in tes ### Profiles and GitHub sync -Every developer has a profile at `/@{username}`, with their GitHub identity, bio and other public profile information, commit/following/follower counts, and an activity graph. The Commits tab lists top-level commits; Replies lists that developer's replies with parent context. Follow and follower counts open the corresponding people lists. The profile links to GitHub and, when available, GitHub Sponsors. Share uses the device's share sheet when supported, or copies the profile link. +Every developer has a profile at `/@{username}`, with their GitHub identity, bio and other public profile information, commit/following/follower counts, and an activity graph. The Commits tab lists top-level commits; Replies lists that developer's replies with parent context. Follow and follower counts open the corresponding people lists. URLs in profile bios are highlighted and clickable, using the same link formatting as commits. The profile links to GitHub and, when available, GitHub Sponsors. Share uses the device's share sheet when supported, or copies the profile link. Change your name, avatar, bio, company, location, or website on GitHub, not on /dev/null. Settings → Profile offers **Edit on GitHub** and **Sync from GitHub**. Profile details also refresh on sign-in. Manual sync is limited to once a minute. A GitHub username rename is picked up on sign-in; accounts are not merged with another user's account. diff --git a/resources/js/components/profile-bio.tsx b/resources/js/components/profile-bio.tsx new file mode 100644 index 0000000000..d8bdb398a7 --- /dev/null +++ b/resources/js/components/profile-bio.tsx @@ -0,0 +1,13 @@ +import { LinkifiedText } from '@/components/linkified-text'; + +export function ProfileBio({ bio }: { bio: string | null }) { + if (!bio) { + return null; + } + + return ( +

+ +

+ ); +} diff --git a/resources/js/pages/user/show.tsx b/resources/js/pages/user/show.tsx index 0fc91c8bbb..a89d82d81c 100644 --- a/resources/js/pages/user/show.tsx +++ b/resources/js/pages/user/show.tsx @@ -28,6 +28,7 @@ import { import { PageTabs } from '@/components/page-tabs'; import { PinCommitButton } from '@/components/pin-commit-button'; import { ProfileActionsMenu } from '@/components/profile-actions-menu'; +import { ProfileBio } from '@/components/profile-bio'; import { ProfileShareButton } from '@/components/profile-share-button'; import { Button } from '@/components/ui/button'; import { UserAvatar } from '@/components/user-avatar'; @@ -244,11 +245,7 @@ export default function Show({ - {user.bio && ( -

- {user.bio} -

- )} +