feat!: remove onStop callback in favor of data-binding triggers - #364
Open
mfazekas wants to merge 4 commits into
Open
feat!: remove onStop callback in favor of data-binding triggers#364mfazekas wants to merge 4 commits into
mfazekas wants to merge 4 commits into
Conversation
State-machine settling is intentionally internal in the Rive runtimes (rive-android 11.8.0 removed the public settledFlow), so the onStop prop shipped in 0.5.0-beta.1 is removed. Fire a data-binding trigger from the state machine instead — see the new README section, the finished_trigger example asset, and the Finished Trigger demo page. The Android render loop keeps the internal stop-advancing-when-settled optimization.
…gacy The behavioral trigger test passes on all four backends; only getPropertiesAsync (used by the introspection test) is unimplemented on the legacy backend, so that one is gated to the new runtime.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the
onStopprop introduced in #353 (shipped only inv0.5.0-beta.1). Per the discussion with the Rive team, state-machine settling is intentionally internal — rive-android 11.8.0 already removed the publicsettledFlowthis was built on — so app behavior shouldn't depend on it.The replacement is a data-binding trigger fired by the state machine when the timeline completes (see this community file for the editor setup). Shipped here as a README section (including the exit-time-100% gotcha), a
finished_trigger.rivasset with a "Finished Trigger" demo page in the example app, and a harness test asserting the trigger fires exactly once and only after the timeline actually plays — on all four backends, legacy included.The Android render loop keeps the internal stop-advancing-when-settled optimization from #353; the iOS settled machinery is removed entirely (the SDK's own view already stops advancing at rest).