A platform for community discussion. Free, open, simple.
UX: Add data-topic-id to featured topic items (#14031)
Jordan Vidrine45c9bbc112f4
diff --git a/app/assets/javascripts/discourse/app/components/categories-boxes-topic.js b/app/assets/javascripts/discourse/app/components/categories-boxes-topic.jsindex 2fa86091259..f7b7e10ef54 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.jsindex fd01dce8d2a..451bf1eecb9 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);