A platform for community discussion. Free, open, simple.
UX: Add chat icon next to event channel (#43716)
Martin Brennan97aefecb32d3
diff --git a/plugins/discourse-events/assets/javascripts/discourse/components/discourse-post-event/chat-channel.gjs b/plugins/discourse-events/assets/javascripts/discourse/components/discourse-post-event/chat-channel.gjsindex 81cd3444dcb..d725caa3883 100644--- a/plugins/discourse-events/assets/javascripts/discourse/components/discourse-post-event/chat-channel.gjs+++ b/plugins/discourse-events/assets/javascripts/discourse/components/discourse-post-event/chat-channel.gjs@@ -1,5 +1,6 @@import { LinkTo } from "@ember/routing";import { and } from "discourse/truth-helpers";+import dIcon from "discourse/ui-kit/helpers/d-icon";import ChannelTitle from "discourse/plugins/chat/discourse/components/channel-title" with {discourseImport: "optional",};@@ -7,7 +8,7 @@ import ChannelTitle from "discourse/plugins/chat/discourse/components/channel-tiexport default <template>{{#if (and @event.channel ChannelTitle)}}<section class="event__section event-chat-channel">- <span></span>+ {{dIcon "comment"}}<LinkToclass="chat-channel-link"@models={{@event.channel.routeModels}}diff --git a/plugins/discourse-events/test/javascripts/integration/components/discourse-post-event-test.gjs b/plugins/discourse-events/test/javascripts/integration/components/discourse-post-event-test.gjsindex 29f52a3c763..0295efeed93 100644--- a/plugins/discourse-events/test/javascripts/integration/components/discourse-post-event-test.gjs+++ b/plugins/discourse-events/test/javascripts/integration/components/discourse-post-event-test.gjs@@ -221,6 +221,29 @@ module("Integration | Component | DiscoursePostEvent", function (hooks) {);});+ test("shows a chat icon for events with a channel", async function (assert) {+ stubApi.call(+ this,+ buildEvent({+ channel: {+ id: 2,+ title: "Product team chat",+ slug: "product-team-chat",+ chatable_type: "Category",+ chatable: { color: "0088cc", read_restricted: false },+ },+ })+ );++ const event = { id: 1 };+ await render(<template><DiscoursePostEvent @event={{event}} /></template>);+ await waitFor(".event-chat-channel");++ assert+ .dom(".event-chat-channel > .d-icon-comment")+ .exists("shows the chat icon beside the channel link");+ });+test("hides the url row when it carries the zoom livestream", async function (assert) {stubApi.call(this,