openscd / open-scd-core

Apache License 2.0
5 stars 8 forks source link

Create ADR: Scoped components/ scoped elements #99

Open Sander3003 opened 1 year ago

Sander3003 commented 1 year ago

The browser as only one space (custom registry) to store tagnames. This could to lead to collision in the tagnames (the componts could have the same tagnames). This means that plug-ins cannot be independent (or risk of breakages). The problem arrises when their are multiple versions for the same tagname.

Current workaround: assumption that the API stays the same. This does not have to be true in the distributed architecture we are after

Shorttime solution: Everybody uses the same MWC version (latest version) Pro: works Con: everybody should stick to the same version We cannot backport the plug-ins to the current/old OpenSCD due to version conficts

Another solution: Scope tagnames Pro: Con: a lot of work to migrate and

Long-term solution: https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md https://chromestatus.com/feature/5090435261792256

Background information: https://open-wc.org/docs/development/scoped-elements/ https://github.com/material-components/material-web/issues/2010

Open questions: How to handle MWC 3?

The solution could be converted into an ADR.

Sander3003 commented 1 year ago

No now, we are leaning towards fixing the MWC version (for now). @ca-d we would like to know your opinion.