From e875fc06cb19e6f3e9a389362edec1ff388b6179 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Fri, 10 Apr 2026 06:06:43 +0300 Subject: [PATCH 1/6] bodge to fix the hero going under the screen when clicking the bottom item --- src/app/features/room/MembersDrawer.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/features/room/MembersDrawer.tsx b/src/app/features/room/MembersDrawer.tsx index 0a74acfda..2f4849288 100644 --- a/src/app/features/room/MembersDrawer.tsx +++ b/src/app/features/room/MembersDrawer.tsx @@ -282,7 +282,12 @@ export function MembersDrawer({ room, members }: MembersDrawerProps) { const btn = evt.currentTarget as HTMLButtonElement; const userId = btn.getAttribute('data-user-id'); if (!userId) return; - openUserRoomProfile(room.roomId, space?.roomId, userId, btn.getBoundingClientRect(), 'Left'); + + const cords = btn.getBoundingClientRect(); + // BODGE, dependent on menuItem height staying at toRem(40) + cords.y = Math.min(cords.y, window.innerHeight - 42); + + openUserRoomProfile(room.roomId, space?.roomId, userId, cords, 'Left'); }; return ( From afc33a18d13f9c85eb8cf55e4378c9c49c378bdd Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sat, 11 Apr 2026 04:25:45 +0300 Subject: [PATCH 2/6] break misc data into sections --- .../components/UserRoomProfileRenderer.tsx | 2 +- .../user-profile/UserRoomProfile.tsx | 68 +++++++++++++------ 2 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/app/components/UserRoomProfileRenderer.tsx b/src/app/components/UserRoomProfileRenderer.tsx index 97489d277..e8b247c01 100644 --- a/src/app/components/UserRoomProfileRenderer.tsx +++ b/src/app/components/UserRoomProfileRenderer.tsx @@ -23,7 +23,7 @@ function UserRoomProfileContextMenu({ state }: { state: UserRoomProfileState }) window.innerHeight / 2 ? 'End' : 'Start'} content={ ) { - const clamp = (str: any, len: number) => { - const stringified = String(str ?? ''); - return stringified.length > len ? `${stringified.slice(0, len)}...` : stringified; - }; const [showMore, setShowMore] = useState(false); + const [moreIndex, setMoreIndex] = useState(0); const [renderAnimals] = useSetting(settingsAtom, 'renderAnimals'); const isCat = profile.isCat === true; @@ -223,25 +220,54 @@ function UserExtendedSection({ {showMore && ( - - {unknownFields.map(([key, value]) => ( - - - {key} - + <> + + {unknownFields.length > 1 && ( + + )} + + {unknownFields[moreIndex][0]} + + {unknownFields.length > 1 && ( + + )} + + + - {clamp(renderValue(value), 128)} + {renderValue(unknownFields[moreIndex][1])} - ))} - + + )} )} From 688feabccff7d721dba3c78afb4780cf696ea992 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sat, 11 Apr 2026 07:47:01 +0300 Subject: [PATCH 3/6] style misc data --- .../user-profile/UserRoomProfile.tsx | 84 +++++++++++++------ 1 file changed, 59 insertions(+), 25 deletions(-) diff --git a/src/app/components/user-profile/UserRoomProfile.tsx b/src/app/components/user-profile/UserRoomProfile.tsx index b76ff3989..5eddd236e 100644 --- a/src/app/components/user-profile/UserRoomProfile.tsx +++ b/src/app/components/user-profile/UserRoomProfile.tsx @@ -35,6 +35,7 @@ import { getSettings, settingsAtom } from '$state/settings'; import { filterPronounsByLanguage } from '$utils/pronouns'; import { useSetting } from '$state/hooks/settings'; import { useSettingsLinkBaseUrl } from '$features/settings/useSettingsLinkBaseUrl'; +import { TextViewerContent } from '$components/text-viewer'; import { CreatorChip } from './CreatorChip'; import { UserInviteAlert, UserBanAlert, UserModeration, UserKickAlert } from './UserModeration'; import { PowerChip } from './PowerChip'; @@ -206,22 +207,40 @@ function UserExtendedSection({ {unknownFields.length > 0 && ( - + {!showMore && ( + + + + )} {showMore && ( - <> - +
+ {unknownFields.length > 1 && ( )} - setShowMore(!showMore)} + style={{ + padding: '1rem', + justifyContent: 'flex-center', + width: 'fit-content', + wordBreak: 'break-word', + overflow: 'hidden', + flexGrow: '1', + }} > - {unknownFields[moreIndex][0]} - + + {unknownFields[moreIndex][0]} + + {unknownFields.length > 1 && (
)}
)} From 5f5957a293359b5588d789c6fb24a047a583af39 Mon Sep 17 00:00:00 2001 From: Shea Duma Date: Sat, 11 Apr 2026 11:54:55 +0300 Subject: [PATCH 4/6] style misc selector --- src/app/components/user-profile/UserChips.tsx | 2 +- .../user-profile/UserModeration.tsx | 4 +- .../user-profile/UserRoomProfile.tsx | 112 +++++++++++------- 3 files changed, 73 insertions(+), 45 deletions(-) diff --git a/src/app/components/user-profile/UserChips.tsx b/src/app/components/user-profile/UserChips.tsx index 1ce3b26c1..44432df22 100644 --- a/src/app/components/user-profile/UserChips.tsx +++ b/src/app/components/user-profile/UserChips.tsx @@ -433,7 +433,7 @@ export function IgnoredUserAlert() { - + Blocked User diff --git a/src/app/components/user-profile/UserModeration.tsx b/src/app/components/user-profile/UserModeration.tsx index a6f8c796e..fb7b679da 100644 --- a/src/app/components/user-profile/UserModeration.tsx +++ b/src/app/components/user-profile/UserModeration.tsx @@ -256,7 +256,9 @@ export function UserModeration({ userId, canKick, canBan, canInvite }: UserModer - Moderation + + Moderation + ) { const [showMore, setShowMore] = useState(false); - const [moreIndex, setMoreIndex] = useState(0); + const [moreIndex, setMoreIndex] = useState(-1); const [renderAnimals] = useSetting(settingsAtom, 'renderAnimals'); const isCat = profile.isCat === true; @@ -146,6 +146,69 @@ function UserExtendedSection({ ([key]) => !KNOWN_KEYS.includes(key) ); + function handleMiscSelector(index: number) { + setMoreIndex(index); + setShowMore(false); + } + + const miscSelector = useMemo( + () => ( + + handleMiscSelector(-1)} + > + + Show less + + {unknownFields.map(([key], index) => ( + handleMiscSelector(index)} + > + {key} + + ))} + + ), + [unknownFields] + ); + const miscHeader = useMemo( + () => ( + + + {showMore && miscSelector} + + ), + [miscSelector, moreIndex, showMore, unknownFields] + ); + return ( {(pronouns || localTime) && ( @@ -207,24 +270,8 @@ function UserExtendedSection({ {unknownFields.length > 0 && ( - {!showMore && ( - - - - )} - - {showMore && ( + {moreIndex === -1 && miscHeader} + {moreIndex > -1 && (
)} - + {miscHeader} {unknownFields.length > 1 && ( - {showMore && miscSelector} + {showMisc && miscSelector} ), - [miscSelector, moreIndex, showMore, unknownFields] + [miscSelector, miscDataIndex, showMisc, unknownFields] ); return ( @@ -270,8 +274,8 @@ function UserExtendedSection({ {unknownFields.length > 0 && ( - {moreIndex === -1 && miscHeader} - {moreIndex > -1 && ( + {miscDataIndex === -1 && miscHeader} + {miscDataIndex > -1 && (
- setMoreIndex(moreIndex === 0 ? unknownFields.length - 1 : moreIndex - 1) + setMiscDataIndex( + miscDataIndex === 0 ? unknownFields.length - 1 : miscDataIndex - 1 + ) } > @@ -306,7 +312,7 @@ function UserExtendedSection({ variant="Secondary" size="300" fill="None" - onClick={() => setMoreIndex((moreIndex + 1) % unknownFields.length)} + onClick={() => setMiscDataIndex((miscDataIndex + 1) % unknownFields.length)} > @@ -322,7 +328,7 @@ function UserExtendedSection({ }} >