Skip to content

A platform for community discussion. Free, open, simple.

DEV: Deprecate CustomHTML hbs templates (#20264)

David Taylor5dc2c0b5a222
diff --git a/app/assets/javascripts/discourse/app/components/custom-html.js b/app/assets/javascripts/discourse/app/components/custom-html.js
index 3fdab2dc364..a532abf6bc5 100644
--- a/app/assets/javascripts/discourse/app/components/custom-html.js
+++ b/app/assets/javascripts/discourse/app/components/custom-html.js
@@ -1,6 +1,7 @@
import Component from "@ember/component";
import { getCustomHTML } from "discourse/helpers/custom-html";
import { getOwner } from "discourse-common/lib/get-owner";
+import deprecated from "discourse-common/lib/deprecated";
export default Component.extend({
triggerAppEvent: null,
@@ -16,6 +17,10 @@ export default Component.extend({
} else {
const template = getOwner(this).lookup(`template:${name}`);
if (template) {
+ deprecated(
+ "Defining an hbs template for CustomHTML rendering is deprecated. Use plugin outlets instead.",
+ { id: "discourse.custom_html_template" }
+ );
this.set("layoutName", name);
}
}