From f111bcb35b3989010584d898c7713bc02e2189a3 Mon Sep 17 00:00:00 2001 From: Roman Rizzi Date: Tue, 22 Aug 2023 14:10:21 -0300 Subject: [PATCH] FIX: Display related topics when scrolling to the bottom of a topic. (#150) Besides updating the connector using the new tracking preference service interface, this PR fixes a bug where due to `ai_embeddings_semantic_related_topics_enabled` not having `client: true` the initializer never ran, and we didn't show the related topics list when scrolling to the bottom of a long topic. --- .../topic-more-content/related-topics.hbs | 4 ++-- .../topic-more-content/related-topics.js | 21 ++++++++++++++++--- config/settings.yml | 4 +++- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/assets/javascripts/discourse/connectors/topic-more-content/related-topics.hbs b/assets/javascripts/discourse/connectors/topic-more-content/related-topics.hbs index 940e901c..2471ab37 100644 --- a/assets/javascripts/discourse/connectors/topic-more-content/related-topics.hbs +++ b/assets/javascripts/discourse/connectors/topic-more-content/related-topics.hbs @@ -3,8 +3,8 @@ class="more-topics__list {{if this.hidden 'hidden'}}" role="complementary" aria-labelledby="related-topics-title" - data-mobile-title={{i18n "discourse_ai.related_topics.pill"}} - data-list-id={{this.listId}} + {{did-insert this.registerList}} + {{will-destroy this.removeList}} >