A platform for community discussion. Free, open, simple.
UX: lower min_post_count to show bottom topic map (#29649)
Kris64291fedf8b0
diff --git a/app/assets/javascripts/discourse/app/components/topic-map/topic-map-summary.gjs b/app/assets/javascripts/discourse/app/components/topic-map/topic-map-summary.gjsindex 14a39278c10..e9c924bbed0 100644--- a/app/assets/javascripts/discourse/app/components/topic-map/topic-map-summary.gjs+++ b/app/assets/javascripts/discourse/app/components/topic-map/topic-map-summary.gjs@@ -28,7 +28,7 @@ const MIN_LIKES_COUNT = 5;const MIN_PARTICIPANTS_COUNT = 5;const MIN_USERS_COUNT_FOR_AVATARS = 2;-export const MIN_POSTS_COUNT = 10;+export const MIN_POSTS_COUNT = 5;export default class TopicMapSummary extends Component {@service site;diff --git a/spec/system/topic_map_spec.rb b/spec/system/topic_map_spec.rbindex 1a83c65122f..c836d4e8cc8 100644--- a/spec/system/topic_map_spec.rb+++ b/spec/system/topic_map_spec.rb@@ -21,8 +21,6 @@ describe "Topic Map", type: :system dotopic_page.visit_topic(topic)expect(topic_page).to have_topic_map- Fabricate(:post, topic: topic, created_at: 2.day.ago)- Fabricate(:post, topic: topic, created_at: 1.day.ago, like_count: 3)2.times { Fabricate(:post, topic: topic, created_at: 1.day.ago, like_count: 1) }page.refreshexpect(topic_page).to have_topic_map@@ -30,6 +28,14 @@ describe "Topic Map", type: :system doFabricate(:post, topic: topic, created_at: 1.day.ago)page.refresh++ # bottom map, avatars details with post counts+ expect(topic_map).to have_no_bottom_map++ Fabricate(:post, topic: topic, created_at: 2.day.ago)+ Fabricate(:post, topic: topic, created_at: 1.day.ago, like_count: 3)+ page.refresh+expect(topic_map.users_count).to eq 6# user count@@ -41,9 +47,6 @@ describe "Topic Map", type: :system dotopic_page.visit_topic(topic)}.to change(topic_map, :users_count).by(1)- # bottom map, avatars details with post counts- expect(topic_map).to have_no_bottom_map-Fabricate(:post, topic: topic)Fabricate(:post, user: user, topic: topic)Fabricate(:post, user: last_post_user, topic: topic)