From 5dc2c0b5a222882e09e3afd5e2e3293214887d1d Mon Sep 17 00:00:00 2001 From: David Taylor Date: Mon, 13 Feb 2023 17:41:32 +0000 Subject: [PATCH] DEV: Deprecate CustomHTML hbs templates (#20264) This is an old system for introducing custom content into Discourse. Nowadays, plugins and themes should be using Plugin Outlets for this. --- .../javascripts/discourse/app/components/custom-html.js | 5 +++++ 1 file changed, 5 insertions(+) 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); } }