open-scd icon indicating copy to clipboard operation
open-scd copied to clipboard

Convert Mixins to Addons

Open pascalwilbrink opened this issue 1 year ago • 4 comments

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 on Lit (preferrably no dependencies at all, just devDependencies)
  • openscd will contain the logic that is needed for implementing API's from core
  • OpenSCD class (outer Shell) should extend directly from LitElement

pascalwilbrink avatar Jan 17 '24 13:01 pascalwilbrink

Can we have prioritized list of mixins/addons that eg.: compass needs to create a distribution?

trusz avatar Feb 01 '24 14:02 trusz

An architecture decision we have to make is how the Addons provide APIs to other Addons and/or Plugins.

trusz avatar Feb 01 '24 14:02 trusz

An example HTML structure of a distribution in Svelte image (6)

trusz avatar Feb 01 '24 14:02 trusz

a small POC: https://stackblitz.com/edit/vitejs-vite-tbwkqi

trusz avatar Feb 06 '24 08:02 trusz