react-union icon indicating copy to clipboard operation
react-union copied to clipboard

Passing common data only to some widgets.

Open wafflepie opened this issue 7 years ago • 0 comments

I think that we should be able to have a common descriptor which only applies to i.e. 3 widgets, not all of them.

Imagine having these widgets in a single application:

um-widget1
um-widget2
um-widget3
tp-widget1
tp-widget2
tp-widget3
widget1
widget2
widget3
<script data-union-common type="application/json">
{
   "baseUrl": "http://localhost:9090"
}
</script>

I would like to override this in a single place for all the widgets prefixed with um. I could either do

<script data-union-common type="application/json">
{
   "umBaseUrl": "http://localhost:7080"
}
</script>

or override the baseUrl in every widget descriptor. I think that neither of these solutions is really clean. Instead, you should be able to specify data-union-common="um" in the common descriptor and something like data-union-group="um" in the widget descriptors. Perhaps we could allow comma-separated values in here as well.

wafflepie avatar Aug 20 '18 11:08 wafflepie