Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Passing common data only to some widgets. #102

Open
wafflepie opened this issue Aug 20, 2018 · 0 comments
Open

Passing common data only to some widgets. #102

wafflepie opened this issue Aug 20, 2018 · 0 comments

Comments

@wafflepie
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant