You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on an idea proposed by @jonnew on Discord, to enhance our Reactive operator documentation, we might want to consider adding a decision tree to easily choose Reactive operators. This could be added as an article on the main docs (hence why this issue is raised here) and added as a link to the respective API pages for the Reactive operators.
As I was playing around with this, I thought that maybe having a decision tree that leads to every single operator is a bit intimidating (has too many levels, hard to check at a glance).
A simple grouping might suffice, as represented in this mermaid diagram made from just the operators in the Bonsai.Reactive namespace.
Might be better as a table if it's just a single level.
Not final, I still need to check, there are definitely some operators missing (like the schedulers) and I need to verify each operator.
Currently too wide, but maybe we can split the operators that operate on a single observable sequence from those that take two sequences.
Can add links to each operators API reference page, as well as a short description on a hover tooltip.
flowchart TD
id1(I want to...)
id2(..do something with 1 sequence.)
id3(..do something with more than 1 sequence.)
id4("`**Compute a value**
Accumulate
Average
Count
ElementIndex
IsEmpty
Max / MaxBy
Min / MinBy
Sum
`")
id5("`**Filter or group elements**
BufferCount
BufferTime
Distinct / DistinctBy
DistinctUntilChanged
DistinctUntilChangedBy
First / FirstOrDefault
Last / LastOrDefault
Skip / SkipLast
Slice
Take / TakeLast
WindowCount
WindowTime
`")
id6("`**Do something with time**
CombineTimestamp
Delay
DelaySubscription
GateInterval
SampleInterval
Throttle
Timeout
Timer
TimeInterval
Timestamp
`")
id7("`**Repeat or Retry**
Repeat
RepeatCount
Retry
RetryCount
`")
id8("`**Transform a sequence**
Materialize
Dematerialize
OrderBy
OrderByDescending
ThenBy
ThenByDescending
`")
id9("`**Create new sequences**
CreateObservable
Defer
GroupBy
SelectMany
`")
id10("`**Create subscriptions**
AsyncSubject
BehaviourSubject
Publish
PublishSubject
Replay
ReplaySubject
ResourceSubject
`")
id11("`**Filter or select elements**
BufferTrigger
Gate
Sample
SkipUntil
SubscribeWhen
TakeUntil
Window
WindowTrigger
`")
id12("`**Combine or merge sequences**
Catch
CombineLatest
Concat
Merge
OnErrorResumeNext
WithLatestFrom
Zip
`")
id1 --> id2
id1 --> id3
id2 --> id4
id2 --> id5
id2 --> id6
id2 --> id7
id2 --> id8
id2 --> id9
id2 --> id10
id3 --> id11
id3 --> id12
Based on an idea proposed by @jonnew on Discord, to enhance our Reactive operator documentation, we might want to consider adding a decision tree to easily choose Reactive operators. This could be added as an article on the main docs (hence why this issue is raised here) and added as a link to the respective API pages for the Reactive operators.
Possible references
The text was updated successfully, but these errors were encountered: