From 08599892498cfbb4478e3f887c8113a3a31b4f27 Mon Sep 17 00:00:00 2001 From: carson chang <37538241+carsick@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:13:03 -0700 Subject: [PATCH] UX: Hide AI summary box if no summary or summarize button --- .../discourse/app/components/topic-map.gjs | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/topic-map.gjs b/app/assets/javascripts/discourse/app/components/topic-map.gjs index 2cc6ef3a8ac..6be19f11364 100644 --- a/app/assets/javascripts/discourse/app/components/topic-map.gjs +++ b/app/assets/javascripts/discourse/app/components/topic-map.gjs @@ -4,6 +4,7 @@ import { hash } from "@ember/helper"; import { action } from "@ember/object"; import { service } from "@ember/service"; import { htmlSafe } from "@ember/template"; +import { or } from "truth-helpers"; import DButton from "discourse/components/d-button"; import PluginOutlet from "discourse/components/plugin-outlet"; import PrivateMessageMap from "discourse/components/topic-map/private-message-map"; @@ -96,26 +97,28 @@ export default class TopicMap extends Component { {{/unless}} -
- {{#if @model.has_summary}} -

{{htmlSafe this.topRepliesSummaryInfo}}

- {{/if}} - + {{#if (or @model.summarizable @model.has_summary)}} +
{{#if @model.has_summary}} - +

{{htmlSafe this.topRepliesSummaryInfo}}

{{/if}} - -
+ + {{#if @model.has_summary}} + + {{/if}} + +
+ {{/if}} {{#if @showPMMap}}