DEV: Deprecate PluginOutlet tagName argument
This commit is contained in:
parent
15b546978f
commit
f9d5203610
|
@ -14,6 +14,8 @@ const PARENT_VIEW_DEPRECATION_MSG =
|
|||
"parentView should not be used within plugin outlets. Use the available outlet arguments, or inject a service which can provide the context you need.";
|
||||
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.";
|
||||
|
||||
/**
|
||||
A plugin outlet is an extension point for templates where other templates can
|
||||
|
@ -56,6 +58,18 @@ export default class PluginOutletComponent extends GlimmerComponentWithDeprecate
|
|||
},
|
||||
};
|
||||
|
||||
constructor() {
|
||||
const result = super(...arguments);
|
||||
|
||||
if (this.args.tagName) {
|
||||
deprecated(`${TAG_NAME_DEPRECATION_MSG} (outlet: ${this.args.name})`, {
|
||||
id: "discourse.plugin-outlet-tag-name",
|
||||
});
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
get connectors() {
|
||||
return renderedConnectorsFor(
|
||||
this.args.name,
|
||||
|
|
Loading…
Reference in New Issue