Skip to content

A platform for community discussion. Free, open, simple.

UX: display post count badge even when user has only two posts. (#15990)

Vinoth Kannanb9d943220db4
diff --git a/app/assets/javascripts/discourse/app/widgets/topic-map.js b/app/assets/javascripts/discourse/app/widgets/topic-map.js
index 9ecb167fc23..7f21df2aac4 100644
--- a/app/assets/javascripts/discourse/app/widgets/topic-map.js
+++ b/app/assets/javascripts/discourse/app/widgets/topic-map.js
@@ -75,7 +75,7 @@ createWidget("topic-participant", {
}),
];
- if (attrs.post_count > 2) {
+ if (attrs.post_count > 1) {
linkContents.push(h("span.post-count", attrs.post_count.toString()));
}
diff --git a/app/assets/javascripts/discourse/tests/integration/widgets/topic-participant-test.js b/app/assets/javascripts/discourse/tests/integration/widgets/topic-participant-test.js
index 1c81bed4973..38ba3462e04 100644
--- a/app/assets/javascripts/discourse/tests/integration/widgets/topic-participant-test.js
+++ b/app/assets/javascripts/discourse/tests/integration/widgets/topic-participant-test.js
@@ -37,7 +37,7 @@ discourseModule(
this.set("args", {
username: "test",
avatar_template: "/images/avatar.png",
- post_count: 5,
+ post_count: 2,
primary_group_name: "devs",
flair_name: "devs",
flair_url: "/images/d-logo-sketch-small.png",