lundegaard / lundegaard/react-union

Passing common data only to some widgets.

Open
#102 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
96
Forks
13
PR merge metrics
No merged PRs in 30d

Description

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
```

```

{
"baseUrl": "http://localhost:9090"
}

```

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

{
"umBaseUrl": "http://localhost:7080"
}

```
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.

Contributor guide

Open the contributing guide

Research direction

Start by locating how the common descriptor and widget descriptors are discovered and matched. Trace how the existing data-union-common attributes are applied, then define the grouping behavior and verify that a common descriptor can target only the intended widgets without changing unrelated widgets.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.