From 46daa96100f496957d626279cda7bf973b5abf71 Mon Sep 17 00:00:00 2001 From: simoleo89 Date: Wed, 20 May 2026 21:24:06 +0200 Subject: [PATCH] fix(mod-tools): empty-value placeholder no longer renders as music note MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User reported empty fields (Email, Last Purchase, Lock Expires, Banned Accs, Abusive CFHs) showing what looks like a music-note glyph next to the label. They aren't censored — they're genuinely empty (a rank-7 Administrator account has none of that data populated). The em-dash "—" (U+2014) used as the placeholder doesn't have a glyph in the Habbo pixel font (Volter / Volter-Goldfish), so the engine falls through to a placeholder glyph that on some font stacks looks like a music note. Two-part fix in ModToolsUserView (Field), ModToolsIssueInfoView (Field) and ModToolsRoomView (owner fallback): 1. Replace the U+2014 em-dash with a plain ASCII `-`. Hyphen-minus is safely in Volter, so the placeholder renders correctly across the whole client. 2. The `value || placeholder` guard is now `(value || value === 0)`. Stat fields whose value is the literal number 0 — a clean account with cfhCount=0, banCount=0, cautionCount=0 — were rendering the placeholder because 0 is falsy. Treat 0 as a real value. Also dropped the `italic` class on the placeholder span — the hyphen does the job on its own and italic on a single-character glyph in a pixel font was making it look like a tilted line. --- src/components/mod-tools/views/room/ModToolsRoomView.tsx | 2 +- .../mod-tools/views/tickets/ModToolsIssueInfoView.tsx | 2 +- src/components/mod-tools/views/user/ModToolsUserView.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/mod-tools/views/room/ModToolsRoomView.tsx b/src/components/mod-tools/views/room/ModToolsRoomView.tsx index 82ece06..951413f 100644 --- a/src/components/mod-tools/views/room/ModToolsRoomView.tsx +++ b/src/components/mod-tools/views/room/ModToolsRoomView.tsx @@ -119,7 +119,7 @@ export const ModToolsRoomView: FC = props => className="text-sm font-semibold leading-tight truncate max-w-full underline cursor-pointer hover:text-sky-700" onClick={ () => ownerId && CreateLinkEvent(`mod-tools/open-user-info/${ ownerId }`) } title={ ownerName ? LocalizeText('modtools.roominfo.owner.open', [ 'username' ], [ ownerName ]) : '' }> - { ownerName || '—' } + { ownerName || '-' } diff --git a/src/components/mod-tools/views/tickets/ModToolsIssueInfoView.tsx b/src/components/mod-tools/views/tickets/ModToolsIssueInfoView.tsx index 22398fa..02911d4 100644 --- a/src/components/mod-tools/views/tickets/ModToolsIssueInfoView.tsx +++ b/src/components/mod-tools/views/tickets/ModToolsIssueInfoView.tsx @@ -15,7 +15,7 @@ interface IssueInfoViewProps const Field: FC<{ label: string; children: React.ReactNode }> = ({ label, children }) => ( <>
{ label }
-
{ children || }
+
{ children || - }
); diff --git a/src/components/mod-tools/views/user/ModToolsUserView.tsx b/src/components/mod-tools/views/user/ModToolsUserView.tsx index b633870..9180e90 100644 --- a/src/components/mod-tools/views/user/ModToolsUserView.tsx +++ b/src/components/mod-tools/views/user/ModToolsUserView.tsx @@ -56,7 +56,7 @@ const Section: FC<{ title: string; children: React.ReactNode }> = ({ title, chil const Field: FC<{ label: string; value: React.ReactNode }> = ({ label, value }) => ( <>
{ label }
-
{ value || }
+
{ (value || value === 0) ? value : - }
);