0.10.0
New:
- Compose UI implementation for
Box
. - Layout modifier support for HTML DOM layouts.
- Unscoped modifiers provide a global hook for side-effecting behavior on native views. For example, create a background color modifier which changes the platform-native UI node through a factory function.
Widget.Children
interface now exposeswidgets: List<Widget<W>>
property. Most subtypes were already exposing this individually.
Changed:
- Disable klib signature clash checks for JS compilations. These occasionally occur as a result of Compose compiler behavior, and are safe to disable (the first-party JetBrains Compose Gradle plugin also disables them).
onModifierChanged
callback inWidget.Children
now receives the index and theWidget
instance affected by the change.- The package of 'redwood-protocol-host' changed to
app.cash.redwood.protocol.host
. This should not affect end-users as its types are mostly for internal use. - The entire
redwood-yoga
artifact's public API has been annotated with an opt-in annotation indicating that it's only for Redwood internal use and is not stable. - Revert: Don't block touch events to non-subviews below a
Row
,Column
, orBox
in the iOSUIView
implementation. This matches the behavior of the Android View and Compose UI implementations. - The generated "widget factories" type (e.g.,
MySchemaWidgetFactories
) is now called a "widget system" (e.g.,MySchemaWidgetSystem
). Sometimes it was also referred to as a "provider" in parameter names. A@Deprecated typealias
is generated for now, but will be removed in the future. - The package names of some generated code has changed. Deprecated
typealias
es are generated in the old locations for public types and functions, but those will be removed in the next release.- Testing code is now under
your.package.testing
. - Protocol guest code is now under
your.package.protocol.guest
. - Protocol host code is now under
your.package.protocol.host
.
- Testing code is now under
- The 'app.cash.redwood.generator.compose.protocol' and 'app.cash.redwood.generator.widget.protocol' Gradle plugins are now deprecated and will be removed in the next release. Use 'app.cash.redwood.generator.protocol.guest' and 'app.cash.redwood.generator.protocol.host', respectively.
- The 'redwood-tooling-codegen' CLI flags for protocol codegen have changed from
--compose-protocol
and--widget-protocol
to--protocol-guest
and--protocol-host
, respectively. - Entrypoints to the protocol on the host-side and guest-side now require supplying the version of Redwood in use on the other side in order to ensure compatibility and work around any bugs in older versions. This uses a new
RedwoodVersion
type, and will be automatically wired if using our Treehouse artifacts.
Fixed:
- Fix failure to release JS resources when calling
CoroutineScope
is being cancelled - JVM targets now correctly link against Java 8 APIs. Previously they produced Java 8 bytecode, but linked against the compile JDK's APIs (21). This allowed linking against newer APIs that might not exist on older runtimes, which is no longer possible. Android targets which also produce Java 8 bytecode were not affected.
- Fix the
View
implementation ofBox
to wrap its width and height by default. This matches the behavior of theUIView
implementation and all other layout widgets. - Fix the
UIView
implementation ofBox
not updating when some of its parameters are changed. - Fix
Modifier.size
not being applied to children inside aBox
. - Fix
Margin
not being applied to theUIView
implementation ofBox
. - The
View
implementation ofBox
now applies start/end margins correctly in RTL, and does not crash if set before the native view was attached. - Fix the backgroundColor for
UIViewLazyList
to be transparent. This matches the behavior of the otherLazyList
platform implementations. - Fix
TreehouseUIView
to size itself according to the size of its subview. - In
UIViewLazyList
, addingbeginUpdates
/endUpdates
calls toinsertRows
/deleteRows
, and wrapping changes inUIView.performWithoutAnimation
blocks. - Fix memory leak in 'protocol-guest' and 'protocol-host' where child nodes beneath a removed node were incorrectly retained in an internal map indefinitely. The guest protocol code has been updated to work around this memory leak when deployed to old hosts by sending individual remove operations for each node in the subtree.
- Ensure that Zipline services are not closed prematurely when disposing a Treehouse UI.
- In
UIViewLazyList
, don't remove subviews from hierarchy duringprepareForReuse
call