説明
The Simpla ecosystem is currently built on v0 of the Web Components specs (and Polymer 1). We should upgrade all elements to WC v1 specs, which will allow us to:
- Make Simpla compatible with Polymer 2 projects
- Strip Polymer from render bundles and use the raw browser APIs, greatly improving first-paint performance
- Server side render content, using skatejs/ssr, fixing #66
- Document element authorship, and make a generalised ES6 mixin to make building elements with any framework easy peasy
- Finally move to ES6 modules and NPM
Prereqs
- Port simpla-element-behavior to ES6 mixin
Elements
- simpla-text
- simpla-img
- simpla-article
- simpla-video
- simpla-admin
- simpla-link
- simpla-collection
- simpla-notify
- simpla-markdown
Misc
- Update docs (snippets, build step for IE, etc)
- Publish elements to NPM, issue deprecation for bower, and manage in monorepo
Notes
-
Elements will be shipped as ES6 classes (see discussion below), which means a) we can strip out buildsteps and boilerplate in elements themselves but b) IE support will need a buildstep from the user
-
Ideally the render bundles of all elements should not need to pull in Polymer, to keep initial upgrade and render as performant as possible
-
Simpla-img will need to be turned into a wrapper element, since
is=""type extension is hard deprecated in v1 🙃 -
Since the element behavior is now an ES6 mixin, it should be renamed and no longer rely on Polymer, but just hook up generic web component classes to Simlpla
-
The richtext behavior used by simpla-text and simpla-article should probably be split off into a generalised JS module, since it's not actually tied to Simpla in any way