mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
FEATURE: Introduce api.renderInOutlet
(#23719)
Until now, plugins/themes had to follow very specific directory structures to set up plugin outlet connectors. This commit introduces a new `api.renderInOutlet` API which makes things much more flexible. Any Ember component definition can be passed to this API, and will then be rendered into the named outlet. For example: ```javascript import MyComponent from "discourse/plugins/my-plugin/components/my-component"; api.renderInOutlet('user-profile-primary', MyComponent); ``` When using this API alongside the gjs file format, components can be defined inline like ```javascript api.renderInOutlet('user-profile-primary', <template>Hello world</template>); ```
This commit is contained in:
@ -7,6 +7,12 @@ in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [1.13.0] - 2023-10-05
|
||||
|
||||
### Added
|
||||
|
||||
- Introduces `renderInOutlet` API for rendering components into plugin outlets
|
||||
|
||||
## [1.12.0] - 2023-09-06
|
||||
|
||||
### Added
|
||||
|
Reference in New Issue
Block a user