doriansmiley / lotusJS

LotusJS is a framework for developing HTML5 applications using web components and TypeScript. It uses a functional style and leverages ramda for composition and currying. Lotus is opinionated about two things: A functional style and separating presentation for code.
Other
12 stars 3 forks source link

look into building tests for web components everywhere #66

Closed doriansmiley closed 3 years ago

doriansmiley commented 7 years ago

Fork here: https://github.com/webcomponents/custom-elements-everywhere. Create a test module for Lotus components.

"Properties are available on a DOM node when being manipulated by JavaScript. Attributes should only be used for scalar values like strings, numbers, and boolean values"

ghost commented 7 years ago

I made a fork of this.

doriansmiley commented 3 years ago

What I'm seeing is that anyone who supports the syntax sugar that web components anywhere wants you to implement is using a templating engine to transpile the code. At least a few are using React's JSX plugin for babel. This leads to larger bundle sizes for the emitted code. I do like a few use cases though which are:

  1. Desctrucring object properties to HTML attributes
  2. Declarative event handlers
  3. Interpolation of random expressions in HTML attributes and children using {}.

If it were possible to create our own Babel plugins, that would be cool maybe. But syntax sugar can be addictive, and the entire point of this framework is to get closer to the DOM.

doriansmiley commented 3 years ago

I created a forked copy of the repo and create libraries/lotus. I started coding out the component and test under src. I left off on ComponentWithChildrenRerender. Once all the components are coded out code out the basic test. Then move onto advanced tests.

doriansmiley commented 3 years ago

Four of the basic tests are passing. This is a great setup for using TypeScript with Karma. Open another ticket to port our testing over to this setup. I updated all npm libs to the latest as well. This would be a good medium article. I would update the boiler plate ts generator with this as well.

doriansmiley commented 3 years ago

Pull request opened: https://github.com/webcomponents/custom-elements-everywhere/pull/1000

doriansmiley commented 3 years ago

I'm going to close this issue as I don't think the project is still active. I can always move people over to my fork if the maintainer does not respond.