v0.2.0-M1
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.
-
Preferring
Signal
instead ofStream
for rendering dynamic content e.g. via<--
. AStream
can always become aSignal
by providing an initial value (orNone
); see the FS2Stream#hold
APIs. The presence of that initial value—indeed, the notion there is always a current value—is important for both correctness and performance. -
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 withIO
, or in tagless final style with the newHtml
typeclass. -
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.
-
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:
- Replace
import calico.dsl.io.*
withimport calico.html.io.{*, given}
- Replace instances of
<-- stream
with<-- stream.holdResource(initialValue)
. Or.holdOptionResource
or.hold1Resource
, depending on the semantics you want.
User-facing PRs
- Towards Calico 0.2 by @armanbilge in #107
- Update to Scala Dom Types v17.0.0 by @2chilled in #117
- Add
HtmlTag#withSelf
, restore debounce example by @armanbilge in #155 - Add
Resource
variants of attr+propSignal
-based modifiers by @armanbilge in #158 - Update to fs2-dom v0.2.0-M1 by @armanbilge in #162
- Cleanup syntax by @armanbilge in #164
New Contributors
Full Changelog: v0.1.2...v0.2.0-M1