open-scd
open-scd copied to clipboard
Convert Mixins to Addons
Acceptance Criteria
- [ ] A successful POC
Lit
of a basic/trivial/example distribution with the simplest Addon (Log) and most complex one (Plugin) - [ ]
Addon
definition exists in Glossary - [ ] Each
Addon
is available to install - [ ] Each
Addon
can be used independently from the others - [ ]
Addon
Requirements are defined with documentation - [ ] Addons depending on different versions of
Lit
still can work together at runtime
Example Addon Requirements
These are just examples, not a final or even a correct list
- Maximum Size
- Custom Element
- Event dispatch target
- How do Addons provide APIs
Out of Scope
- Documenting how to create a distribution
Notes
- the POC's structure and dependencies on packages needs to be very similar to the real world usage, otherwise we won't find problems like querying over shadow DOM
-
core
should not depend onLit
(preferrably no dependencies at all, just devDependencies) -
openscd
will contain the logic that is needed for implementing API's fromcore
- OpenSCD class (outer Shell) should extend directly from
LitElement
Can we have prioritized list of mixins/addons that eg.: compass needs to create a distribution?
An architecture decision we have to make is how the Addons provide APIs to other Addons and/or Plugins.
An example HTML structure of a distribution in Svelte
a small POC: https://stackblitz.com/edit/vitejs-vite-tbwkqi