From 45c9bbc112f474635c2884e19e02bdefc44a8fb1 Mon Sep 17 00:00:00 2001 From: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Date: Thu, 12 Aug 2021 14:32:33 -0500 Subject: [PATCH] UX: Add data-topic-id to featured topic items (#14031) --- .../discourse/app/components/categories-boxes-topic.js | 1 + .../javascripts/discourse/app/components/featured-topic.js | 1 + 2 files changed, 2 insertions(+) diff --git a/app/assets/javascripts/discourse/app/components/categories-boxes-topic.js b/app/assets/javascripts/discourse/app/components/categories-boxes-topic.js index 2fa8609125..f7b7e10ef5 100644 --- a/app/assets/javascripts/discourse/app/components/categories-boxes-topic.js +++ b/app/assets/javascripts/discourse/app/components/categories-boxes-topic.js @@ -3,6 +3,7 @@ import discourseComputed from "discourse-common/utils/decorators"; export default Component.extend({ tagName: "li", + attributeBindings: ["topic.id:data-topic-id"], @discourseComputed("topic.pinned", "topic.closed", "topic.archived") topicStatusIcon(pinned, closed, archived) { diff --git a/app/assets/javascripts/discourse/app/components/featured-topic.js b/app/assets/javascripts/discourse/app/components/featured-topic.js index fd01dce8d2..451bf1eecb 100644 --- a/app/assets/javascripts/discourse/app/components/featured-topic.js +++ b/app/assets/javascripts/discourse/app/components/featured-topic.js @@ -1,6 +1,7 @@ import Component from "@ember/component"; export default Component.extend({ classNameBindings: [":featured-topic"], + attributeBindings: ["topic.id:data-topic-id"], click(e) { const $target = $(e.target);