-
Notifications
You must be signed in to change notification settings - Fork 10
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
Consider adding a Reactive operator decision tree/flowchart/table reference #117
Comments
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).
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
|
This is a mockup of the table format. We can include links to the API reference for each operator, together with a short description of each operator as a tooltip (I only did the first two as an example). If the table is too wide, we can further split it up.
|
Another option for a table layout is having a tab layout, with each tab being a different grouping of reactive operators. Each table would just have two columns, the operator name, and the description. Unfortunately I am unable to generate a preview for that in the GitHub issue comment but it will look similar to what is being done for the editor shortcut PR. |
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: