-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propagate events with state for feedbacks #12
Merged
Merged
Conversation
This file contains 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
andersio
reviewed
May 27, 2020
sergdort
commented
May 27, 2020
sergdort
changed the title
Propagate even with state for feedbacks
Propagate events with state for feedbacks
May 27, 2020
Could you add unit tests to assert that events are flowing in the order as expected? |
sergdort
force-pushed
the
sergey/feedbacks-with-events
branch
from
June 2, 2020 14:17
ce2dd4a
to
92f4baa
Compare
@andersio I believe I addressed your comments |
We need to test this: Loop/Loop/Public/FeedbackLoop.swift Lines 82 to 87 in ef4a208
that subscribing to |
andersio
reviewed
Jun 11, 2020
andersio
approved these changes
Jul 13, 2020
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.
Per #5
Resurrecting old proposal from @inamiy babylonhealth/ReactiveFeedback#41
This is an additive change to add
Optional<Event>
argument inFeedback
so that unnecessary intermediate states will no longer be required.Event-driven feedback will be useful for following scenarios, without needing to add a new state and then transit (and transit back again):
This is a change from Moore model to (kind of) Mealy model as discussed in babylonhealth/ReactiveFeedback#32 (review) .
Please note that
reducer
andfeedback
are still in sequence, not parallel.Also, please note that
Optional<Event>
is used here as a workaround since it requires more breaking changes to minimize into non-optionalEvent
.