The discussion revolves around a plugin issue where a component error occurs due to template override restrictions, despite the component not being authored with gjs. RGJ initially faced an error about feedback-stream being authored with gjs, but later realized the issue stemmed from UserStream, which is written in gjs, and their component inherits from it. David explains that mixing gjs and hbs in inheritance is problematic and suggests using gjs for the component. He clarifies that the issue is not a template override (which is deprecated), but rather component inheritance, where a child component inherits the parent’s template unless overridden. Arkshine acknowledges the misunderstanding, and RGJ thanks the contributors for the clarification.
This was is the error I am getting in my browser console.
/discourse/templates/components/feedback-stream] feedback-stream was authored using gjs and its template cannot be overridden. Ignoring override. For more information on the future of template overrides, see https://meta.discourse.org/t/247487
But, as you can see, it wasn't written using gjs.
Now I decided to ignore this error for now and continued modernizing the plugin. As soon as I colocated the templates (so mv templates/components/* components) the error went away. But the template is still ignored.
BTW @Arkshine I see your - so just clarifying here. Template overrides are deprecated, regardless of the original authoring format. We’ll be removing them completely in the next few months. For those cases, you’re 100% right that Plugin Outlets are the solution.
But what @RGJ is doing here is not a template override, it’s using Ember’s component inheritance system. Instead of doing
class Foo extends Component
you can do
class Foo extends SomeOtherComponent
In that case, your component will inherit the template of SomeOtherComponent, or you can choose to replace the template yourself. Your template replacement only applies to Foo, and won’t affect the parent SomeOtherComponent.
This kind of inheritance is a fairly seldom-used feature though. We tend to lead towards “composition” instead, where you wrap components in each-other within a template. (e.g. that’s how DModal is used)