glimmerjs / glimmer.js

Central repository for the Glimmer.js project
https://glimmerjs.com
MIT License
746 stars 75 forks source link

2.0 Roadmap #236

Open pzuraq opened 4 years ago

pzuraq commented 4 years ago

Features

Cleanup

andreisebastianc-ccc commented 4 years ago

There is a recipe for using glimmer components as web components. I've used this a couple of times, including in production 😈. For my use-cases the current mechanism is fine, but I'm curious if v2.0 will continue to support this or maybe even expand to include slots.

pzuraq commented 4 years ago

Glimmer.js 2 will not support this directly out of the box at first, though it should be possible to add it yourself through a web-component wrapper similar to @glimmer/web-component.

The goal of v2 is to be much more flexible and minimal overall though. There is no more resolution, and no need to create an app instance, so you should be able to use renderComponent multiple times fairly easily. Along with template imports, this should make adopting Glimmer.js incrementally much easier. We are specifically designing this with the ability to adopt incrementally for React/Vue/Svelte users, for instance, if that help.

andreisebastianc-ccc commented 4 years ago

Follow-up question: could I expect that, for 2.0, glimmer components created in an ember app work out of the box in a glimmer-only setup?

Example use-case: stand-alone visualization that is built in a glimmer codebase that I want to bring into an ember app by doing a simple import rather than including a compiled script

pzuraq commented 4 years ago

One of the goals is to allow for a library built on top of Glimmer 2 that enables this. There will be some minor differences, but otherwise it should work.

mehulkar commented 4 years ago

One of the goals is to allow for a library built on top of Glimmer 2

So ember will be built on top of glimmer 2?

pzuraq commented 4 years ago

No, the immediate goal is to rebuild @glimmerx on top of Glimmer 2. @glimmerx will have a more opinionated set of defaults, such as default Helper and Modifier implementations, but will otherwise work pretty much the same. It will also ensure it works with both Ember and Glimmer apps but swapping out implementations of things when used in one environment of the other.

See: https://github.com/tomdale/glimmer-lite-donut/

Long term, I'd like to get Ember to a place where it can be rebuilt on this core, but we're a long ways off from that.