From 6bf3739084a1169f715a85b9db138e78858c4156 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Fri, 18 Feb 2022 07:54:37 +0530 Subject: [PATCH 1/2] UX: display post count badge even when user has only two posts. --- app/assets/javascripts/discourse/app/widgets/topic-map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/widgets/topic-map.js b/app/assets/javascripts/discourse/app/widgets/topic-map.js index 9ecb167fc23c80..7f21df2aac4bf0 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())); } From e5efcc7927139999be1ee8a9bbfec05fbbbbc838 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Fri, 18 Feb 2022 08:29:46 +0530 Subject: [PATCH 2/2] TEST: display post count even for 2 posts. --- .../tests/integration/widgets/topic-participant-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 1c81bed4973b25..38ba3462e042a4 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",