Missing icon for likes on archived topics

AI-generated summary

The discussion addresses an issue where, on archived topics, the like count appears without an icon, making it unclear what the number refers to. bloomexperiment reports that while the count is visible, the absence of a like icon (such as a heart) causes confusion, especially for anonymous users. codinghorror acknowledges the issue and notes that liking is disabled on archived topics, but the display of the count without context is problematic. Chaboi_3000 references a previous decision to disable likes on archived topics. techAPJ explains that the behavior changed after a commit, and that the current display—showing only the count without an icon—was unintended. They identify a bug where logged-in users also don’t see the like icon next to the count on the first post. techAPJ submits a fix, which is merged, resolving the issue by adding an un-clickable :heart: icon next to the like count for anonymous users on archived topics. bloomexperiment confirms the fix works as intended.

I noticed this for a bit but forgot to report. On archived topics, the like count is shown on posts, but with no icon. I think it’s not clear that it refers to likes. (I was expecting maybe a greyed out heart to indicate you can’t like) Though you can still click on it to view the avatars underneath.

3 Likes

I see, good find, this appears for anons when viewing the topic

https://meta.discourse.org/t/how-can-i-bulk-organize-users-into-groups/19426

We should fix this your Monday @sam

2 Likes

Isn’t it intentional?

Yeah I am aware that liking is disabled on archived topics. However the number for the like count by itself seems confusing. I think previously, the button used to say “3 Likes” for example, whereas now it just has “3”.

Previously on archived topics we were not showing Like counts at all for anons. That behaviour changed (regressed) after this commit:

https://github.com/discourse/discourse/commit/47995d2d899da4a0726ef3b9004bcfd4edf7e9b1

@codinghorror should we continue showing Like count (with proper icon) on archived topics, or remove the count like we used to do earlier?

2 Likes

Surely that has always been a bug? We just never noticed since archive is such a rare state in the wild.

3 Likes

I am unclear, is the bug fixed now?

It’s not fixed. What’s happening now is that there is no Like icon showing up for anon on archived posts, just the count. I will fix that to show (un-clickable) :heart: icon as well next to count.

Another bug I noticed is that for logged in users Like icon is not showing up on first post next to count (example here). Will fix that as well.

3 Likes

PR is up at

https://github.com/discourse/discourse/pull/7775

EDIT: PR is merged.

7 Likes

Thank you so much. :blush: I tested archiving a topic and viewing from anon, and there was the like icon next to the count

5 Likes