Skip to content

0.10.0

Compare
Choose a tag to compare
@github-actions github-actions released this 05 Apr 20:51
· 99 commits to trunk since this release

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 exposes widgets: 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 in Widget.Children now receives the index and the Widget 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, or Box in the iOS UIView 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 typealiases 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.
  • 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 of Box to wrap its width and height by default. This matches the behavior of the UIView implementation and all other layout widgets.
  • Fix the UIView implementation of Box not updating when some of its parameters are changed.
  • Fix Modifier.size not being applied to children inside a Box.
  • Fix Margin not being applied to the UIView implementation of Box.
  • The View implementation of Box 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 other LazyList platform implementations.
  • Fix TreehouseUIView to size itself according to the size of its subview.
  • In UIViewLazyList, adding beginUpdates/endUpdates calls to insertRows/deleteRows, and wrapping changes in UIView.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 during prepareForReuse call