picoapp icon indicating copy to clipboard operation
picoapp copied to clipboard

refactor: complete rewrite powered by web components

Open mikehwagz opened this issue 1 year ago • 1 comments

BREAKING CHANGE: Such changes warrant a major release 🎉

mikehwagz avatar Aug 08 '23 13:08 mikehwagz

This is a complete rewrite of picoapp and a new major version.

  • Powered by custom elements
  • Refs API to simplify the selection of many elements within components via @ref attribute
  • Context-aware store and dom events that auto cleanup when elements
  • Still ~1kb gzipped
  • Written in TypeScript and tooling powered by Vite
  • Test suite powered by Vitest
  • Semantic release pipeline

Still WIP / Todo:

  • [ ] Add optional 3rd argument for component to pass in options such as { extends: 'button' } to create custom elements that are instances of other constructors like HTMLButtonElement or HTMLParagraphElement that then get written like <p is="word-count"></p> or created like document.createElement('p', { is: 'word-count' }). Currently we are just checking if the component name contains button and doing the necessary things internally, but this is limited to just button at the moment lol
  • [ ] Update documentation
  • [ ] Consider evx update since we are changing the store API and it needs types anyway. Do we build the store into picoapp? or do we do a new major version of evx?

mikehwagz avatar Aug 08 '23 14:08 mikehwagz