Visualize Observable chains
planned
Misha Moroshko
planned
Julien Pradet
This one would be awesome !
However, when you're chaining a lot of operators, it might quickly become unreadable.
What about displaying only obervables assigned to a variable ?
```js
const interval$ = Rx.Observable.interval(1000)
const multipliedBy3$ = interval$.map(n => n * 3)
const even$ = multipliedBy3.filter(n => n % 2)
```
With this method, you'd be able to add names to the diagram too.
I'd be happy to contribute something along these lines if you think it would be a nice addition to your lib. I don't know how the lib works yet, but it could be fun to dive in :)
Edit: I read a few lines of code and understand why displaying the chain of operators instead of thinking of assigned variables would be far easier!
Misha Moroshko
Julien Pradet: I like this idea! Specifically, I like that users explicitly define what to visualize, as opposed to us trying to infer the subchains from the code, which can be very tricky. And, we get the names automatically from the variable names, which is nice. The only downside I see is that the code could become more verbose. But, at the same time, it could become more readable. So, overall, I think we should definitely explore this idea.
Shall we just stack the Observables vertically, and animate them together, or there is more to it?
Julien Pradet
Misha Moroshko: something that feels good for helping the user would be to share colors between derived values.
Actually that would work pretty well for simple transformations such as map/filter//reduce/etc. It would even work for higher order observables since all the sub values could have the same color as the parent. But I have no idea how to do that for trickier operators such as delay.
Anyway, the vertical stacking is a nice beginning !