Skip to content

v0.2.0-M1

Compare
Choose a tag to compare
@armanbilge armanbilge released this 25 Jan 19:46
· 427 commits to main since this release
2eb6389

I am excited to release the first milestone of Calico v0.2.0! This new series continues the same look-and-feel as the 0.1.x series while delivering safer, more idiomatic APIs and performance improvements.

  1. Preferring Signal instead of Stream for rendering dynamic content e.g. via <--. A Stream can always become a Signal by providing an initial value (or None); see the FS2 Stream#hold APIs. The presence of that initial value—indeed, the notion there is always a current value—is important for both correctness and performance.

  2. Offering a more idiomatic Cats Effect-style API, with the option for tagless final. We are in the process of wrapping all unsafe JS APIs (e.g. HTMLElement and friends) with safe, Cats Effect-based versions in the FS2 DOM project. You may use these via the DSL directly with IO, or in tagless final style with the new Html typeclass.

  3. Updating to Scala Dom Types v17.0.0. It is no longer a runtime dependency; we are now 100% generating our own customized sources for HTML tags, attributes, and properties! Thanks to @2chilled for leading this effort.

  4. Performance enhancements, by strategically scheduling non-rendering-related work after rendering. This will also build on the new JS runtime developed in typelevel/cats-effect#3225 for the upcoming Cats Effect 3.5.0.

I expect development from this point to be "mostly stable". The remaining breaking changes will be the continued effort to provide safe Cats Effect wrappers for unsafe JS APIs (notably, Event and friends).

Otherwise, this milestone is fully functional and already a marked improvement over the 0.1.x series. So I strongly encourage its use, and consider the 0.1.x series to be EOL.

To migrate from Calico 0.1.x:

  1. Replace import calico.dsl.io.* with import calico.html.io.{*, given}
  2. Replace instances of <-- stream with <-- stream.holdResource(initialValue). Or .holdOptionResource or .hold1Resource, depending on the semantics you want.

User-facing PRs

New Contributors

Full Changelog: v0.1.2...v0.2.0-M1