From 84f6a8399d4269a976ea420aa72b025bfeba2ba9 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 31 Jan 2023 12:47:40 +0000 Subject: [PATCH] DEV: Deprecate PluginOutlet `@args` in favour of `@outletArgs` --- .../javascripts/discourse/app/components/plugin-outlet.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/javascripts/discourse/app/components/plugin-outlet.js b/app/assets/javascripts/discourse/app/components/plugin-outlet.js index ef837a68314..840c8b73f32 100644 --- a/app/assets/javascripts/discourse/app/components/plugin-outlet.js +++ b/app/assets/javascripts/discourse/app/components/plugin-outlet.js @@ -16,6 +16,8 @@ const GET_DEPRECATION_MSG = "Plugin outlet context is no longer an EmberObject - using `get()` is deprecated."; const TAG_NAME_DEPRECATION_MSG = "The `tagName` argument to PluginOutlet is deprecated. If a wrapper element is required, define it manually around the outlet call."; +const ARGS_DEPRECATION_MSG = + "PluginOutlet arguments should now be passed using `@outletArgs=` instead of `@args=`"; /** A plugin outlet is an extension point for templates where other templates can @@ -67,6 +69,12 @@ export default class PluginOutletComponent extends GlimmerComponentWithDeprecate }); } + if (this.args.args) { + deprecated(`${ARGS_DEPRECATION_MSG} (outlet: ${this.args.name})`, { + id: "discourse.plugin-outlet-args", + }); + } + return result; }