mirror of
https://github.com/discourse/discourse.git
synced 2024-11-28 19:53:53 -06:00
DEV: Update before-header-panel outlet arguments (#24796)
Passing through `attrs` is problematic for a few reasons:
1. Connectors could mutate it and cause issues in the parent widget
2. It doesn't provide a clean API boundary. The connector can access all attrs of the widget. As we move towards refactoring the header away from widgets, this may change. Better to explicitly call out the things we expect plugins/themes to access
3. `attrs` is a reserved property for classic components. Passing an argument called `attrs` into a classic component raises a 'computed property override' deprecation error under Ember 3.28, and causes an error in Ember 4+.
Unfortunately this will be a breaking change to the outlet. Fortunately, it was introduced fairly recently and does not have too many users. We will make immediate updates to themes/plugins we are aware of.
Followup to 9cc2b5cc20
This commit is contained in:
parent
ce723caae2
commit
4adbcf3f2a
@ -4,5 +4,5 @@ import { registerWidgetShim } from "discourse/widgets/render-glimmer";
|
||||
registerWidgetShim(
|
||||
"before-header-panel-outlet",
|
||||
"div.before-header-panel-outlet",
|
||||
hbs`<PluginOutlet @name="before-header-panel" @outletArgs={{hash attrs=@data}} /> `
|
||||
hbs`<PluginOutlet @name="before-header-panel" @outletArgs={{hash topic=@data.topic}} /> `
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user