Skip to content

Commit 72b110a

Browse files
committed
fix: keep the unread comment icon's weight out of the forced style
The discussion list signals unread replies by icon weight alone: a solid comment for unread against a regular one for read. Forcing a FontAwesome style restyled both to the same weight, making the two states indistinguishable. The unread icon now opts out with noStyleOverride, the same exemption the online indicator and subscription stars use (#4873). The read-state icon still follows the forced style, so the contrast survives — the checkmark shown on hover is an action glyph, not a weight signal, and keeps following the forced style too.
1 parent fa31702 commit 72b110a

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

framework/core/js/src/forum/components/DiscussionListItem.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,15 @@ export default class DiscussionListItem<CustomAttrs extends IDiscussionListItemA
319319
return (
320320
<DiscussionListItemStatsItem
321321
className="DiscussionListItem-count"
322-
icon={showUnread ? [<Icon name={'fas fa-check _checkmark'} />, <Icon name={'fas fa-comment _comment'} />] : <Icon name={'far fa-comment'} />}
322+
icon={
323+
showUnread ? (
324+
// The solid comment against the read state's regular one is what
325+
// signals unread, so it must keep its weight under a forced style.
326+
[<Icon name={'fas fa-check _checkmark'} />, <Icon name={'fa-solid fa-comment _comment'} noStyleOverride />]
327+
) : (
328+
<Icon name={'far fa-comment'} />
329+
)
330+
}
323331
label={showUnread ? abbreviateNumber(discussion.unreadCount()) : abbreviateNumber(discussion.replyCount())}
324332
ariaLabel={app.translator.trans(a11yKey, { count: discussion.unreadCount() })}
325333
onclick={showUnread ? this.markAsRead.bind(this) : undefined}

0 commit comments

Comments
 (0)