From d9cd3df7b20148f9e86a87f50e0c448790882122 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 9 Jul 2026 18:32:42 -0500 Subject: [PATCH] Render additional labels pill standalone with spelled-out text Move the early return below the additional labels computation so the pill renders on the author's own post even when no other moderation is visible - it may be their only entry point to appeal labels on their content. When no other pills precede it, spell out "n labels applied" instead of the "+n" continuation syntax. Co-Authored-By: Claude Fable 5 --- src/components/moderation/PostAlerts.tsx | 42 ++++++++++++++++++++---- 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/src/components/moderation/PostAlerts.tsx b/src/components/moderation/PostAlerts.tsx index 6718dc70c8..5290455da9 100644 --- a/src/components/moderation/PostAlerts.tsx +++ b/src/components/moderation/PostAlerts.tsx @@ -33,15 +33,13 @@ export function PostAlerts({ }) { const {currentAccount} = useSession() - if (!modui.alert && !modui.inform && !additionalCauses?.length) { - return null - } - const alerts = modui.alerts.filter(unique) const informs = modui.informs.filter(unique) /* * The "+n" pill surfaces labels for the author to review and appeal, so it - * only applies when the viewer is the author. + * only applies when the viewer is the author. It renders even when no other + * moderation is visible, since it may be the author's only entry point to + * appeal labels on their content. */ const isOwnPost = !!post && post.author.did === currentAccount?.did const allLabels: ComAtprotoLabelDefs.Label[] = isOwnPost @@ -67,6 +65,15 @@ export function PostAlerts({ ), ) + if ( + !modui.alert && + !modui.inform && + !additionalCauses?.length && + !additionalLabels.length + ) { + return null + } + return ( {alerts.map(cause => ( @@ -94,7 +101,15 @@ export function PostAlerts({ /> ))} {additionalLabels.length ? ( - + 0 || + informs.length > 0 || + (additionalCauses?.length ?? 0) > 0 + } + /> ) : null} ) @@ -103,9 +118,15 @@ export function PostAlerts({ function AdditionalLabels({ labels, size, + hasPrecedingPills, }: { labels: ComAtprotoLabelDefs.Label[] size?: Pills.CommonProps['size'] + /** + * The compact "+n" syntax only makes sense as a continuation of other + * pills. When this pill stands alone, spell it out. + */ + hasPrecedingPills: boolean }) { const {t: l} = useLingui() const control = useLabelsOnMeDialogControl() @@ -115,7 +136,14 @@ function AdditionalLabels({ {