-
-
Notifications
You must be signed in to change notification settings - Fork 804
Description
Rigt now, the only way to specify headless plugins is in the configuration file. Given that layout files are meant to be freely shared, this can limit their usefulness. To fix this we can add a plugins
field to the layout file. An example might help here:
---
plugins:
# Http urls don't actually work yet... but in the future
- path: "https://a-headless-plugin.com/plugin.wasm"
run: headless
template:
direction: Horizontal
parts:
- direction: Vertical
body: true
tabs:
- direction: Vertical
Now that I'm looking at it, the path
field from the PluginConfiguration
should probably be changed to a location
that accepts a fully resolved URL via the RunPluginLocation
. This would help bring it in line with what's given as plugin configuration in the layout template.
Aside from that, how the layout files plugins field is merged with the configuration files is also an issue. We've got a some options here:
- Overwrite the plugins with the same name
- Do a merge of the plugins, partially overwriting the plugins from the configuration file with the layout file plugins
- Crash / Ignore one or the other
- Just drop the plugins from the configuration file, use only the layout file configuration options.
I think initially I like option #1. Any plugin from the layout file with a matching tag name can just override the configuration plugins. In the future if it's necessary we can add an option that'll merge the configuration options rather than override them.
h