A current hiccup in many workflows is when one component uses another. This is solved from the template side, as a hero component can use {% bookshop button bind=button %} in its template. This is not solved from the TOML side yet, and thus the following needs to be written:
# button.bookshop.toml
[props]
link = "/"
text = "Click"
# hero.bookshop.toml
[props]
title = "Hello World"
[props.button]
link = "/"
text = "Click"
This is an undesirable duplication of schema and will cause components to lose parity in a way that can't be caught automatically. Ideally we would write something like the following:
# button.bookshop.toml
[props]
link = "/"
text = "Click"
# hero.bookshop.toml
[props]
title = "Hello World"
button = "{button}" # <-- something that embeds the button component here
This would necessitate a change in architecture where the plugin that builds structures (cloudcannon-structures) has access to all TOML files, rather than processing them in isolation like it does currently.
A current hiccup in many workflows is when one component uses another. This is solved from the template side, as a hero component can use
{% bookshop button bind=button %}
in its template. This is not solved from the TOML side yet, and thus the following needs to be written:This is an undesirable duplication of schema and will cause components to lose parity in a way that can't be caught automatically. Ideally we would write something like the following:
This would necessitate a change in architecture where the plugin that builds structures (
cloudcannon-structures
) has access to all TOML files, rather than processing them in isolation like it does currently.