Skip to content
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

Feature: GroupOnObservable Operator #847

Merged
merged 14 commits into from
Feb 10, 2024

Conversation

dwcullop
Copy link
Member

@dwcullop dwcullop commented Feb 8, 2024

Description

New Group Operator that groups values based on the latest value returned from an observable created using the given factory function.

  • Values are not observed downstream until their Observable fires once
  • Any event after the first will have the effect of moving the value from one group to another
  • Any errors in the grouping observable will bring down the entire stream
  • If the source observable completes, the downstream sequence will also complete (and the sequence from each Group will complete).
  • If the number of items in a group drops to zero, the group will be removed and any subscribers to the Group's Cache will see OnComplete
  • If the number of items in a group drops to zero, but within the same changeset, another item gets added to that group, the group will NOT be removed/re-added.

@dwcullop dwcullop marked this pull request as draft February 8, 2024 04:00
@dwcullop dwcullop marked this pull request as ready for review February 9, 2024 10:26
- Refactor DynamicGrouper
- Made DynamicGrouper Disposable
- Added more unit tests for some corner cases
Avoid an extra lookup when dealing with Refresh
@dwcullop dwcullop enabled auto-merge (squash) February 9, 2024 23:40
@dwcullop dwcullop merged commit 04e2ff8 into reactivemarbles:main Feb 10, 2024
1 check passed
@dwcullop dwcullop deleted the feature/group-on-observable branch February 10, 2024 18:40
@dwcullop dwcullop linked an issue Feb 10, 2024 that may be closed by this pull request
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: New Operator GroupOnObservable
2 participants