Changes since 25.1.0-alpha8
Breaking changes
-
Remove WritableSignal interface and simplify signal API
Commit · Pull request · IssueRemove the WritableSignal interface and related mapped signal adapters to simplify the signals API and force explicit use of helper methods for two-way bindings. Key changes: - Remove WritableSignal interface completely - Change ValueSignal.set() to return void (local signals resolve immediately) - Keep SharedValueSignal.set() returning SignalOperation (shared signals may be async) - Remove WritableSignal.map() and mapped signal adapters (MappedWritableSignal, MappedModifySignal) - Add ValueSignal.asReadonly() to create read-only signal views - Update all usages to use concrete signal types instead of WritableSignal - Update documentation to reference new helper methods (updater, modifier) This simplifies the API by removing generic writable signal abstractions and encouraging explicit patterns via helper methods.
-
Remove ComponentEffect (#23558)
-
Remove ComponentEffect::bind (#23533)
New features
-
Remove ComponentEffect#bindChildren usage
Commit · Pull requestDeprecates ComponentEffect#bindChildren. Remove all calls to it by using HasComponents#bindChildren. Part of #23534
-
Add Effect#effect(Component, SerializableRunnable)
Commit · Pull requestMoving ComponentEffect#effect to Effect#effect. This change just deprecates it from the ComponentEffect. Part of #23528
-
Add callback helper methods for bindValue
Commit · Pull requestAdd updater() and modifier() helper methods to ValueSignal and SharedValueSignal to simplify creating write callbacks for bindValue. The updater() helper creates callbacks for immutable value patterns using ValueMerger functions (e.g., records with withXxx() methods). The modifier() helper creates callbacks for mutable value patterns using SignalModifier functions (e.g., beans with setXxx() methods). This makes two-way bindings more explicit and easier to understand compared to complex two-way computed signals. Example usage: - Immutable: textField.bindValue(personSignal.map(Person::name), personSignal.updater(Person::withName)) - Mutable: textField.bindValue(personSignal.map(Person::getName), personSignal.modifier(Person::setName)) Updated HasValue documentation with comprehensive examples showing both patterns. Added extensive test coverage including unit tests and integration tests with bindValue. Part-of #23499 (new helpers),
WritableSignalwill be removed in the other commit/PR 🤖 Generated with Claude Code -
Make bindProperty to support write callbacks
Commit · Pull request · IssueFor two-way data binding. Change Element's bindProperty(String, WritableSignal) to bindProperty(String, Signal, SerializableConsumer) so that two-way bindings require an explicit write-back callback.