-
Notifications
You must be signed in to change notification settings - Fork 3k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Reconsider inspectTime #4429
Comments
edit: the above doesn't work. I just made a custom operator to do what I want. |
@pcurrivan can you link the operator you created here if it's open source? That way people that are looking for it can find it if they find this issue. We're always happy to consider these things, but there's also the pressure of getting a lot of flak for having so many operators to start with. 😆 🤷♂️ |
Sure, here it is. I just wrapped some plain JS I had lying around after I had trouble getting the old inspectTime code to work and I couldn't quickly wrap my head around the abstractions used in existing RxJS operator code. |
@pcurrivan maybe you look for throttleTime with the If yes, please close the issue. If no @benlesh should consider either closing this one or give some suggestions for the next steps |
@BioPhoton, unfortunately, that configuration does not work the way you think.
As you can see, throttleTime with leading and trailing disabled does not work as the operator requested in this issue. See issue #2727 and a proposed fix in form of pr #4727. The problem is that maintainers aren't sure about changing throttleTime. |
I had to write my own implementation
|
…least the throttled amount Works to align the behavior with expectations set by lodash's throttle - Updates tests - Ensures trailing throttle will wait to notify and then complete - Ensures that every time we emit a value a new throttle period starts fixes ReactiveX#3712 related ReactiveX#4864 fixes ReactiveX#2727 closes ReactiveX#4727 related ReactiveX#4429
…least the throttled amount Works to align the behavior with expectations set by lodash's throttle - Updates tests - Ensures trailing throttle will wait to notify and then complete - Ensures that every time we emit a value a new throttle period starts fixes ReactiveX#3712 related ReactiveX#4864 fixes ReactiveX#2727 closes ReactiveX#4727 related ReactiveX#4429
…least the throttled amount (#5687) * fix(throttleTime): ensure the spacing between throttles is always at least the throttled amount Works to align the behavior with expectations set by lodash's throttle - Updates tests - Ensures trailing throttle will wait to notify and then complete - Ensures that every time we emit a value a new throttle period starts fixes #3712 related #4864 fixes #2727 closes #4727 related #4429 * chore: Address comments and add comments to the code
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Feature Request
Of the five *Time operators, it seems to me you guys removed the most useful one. inspectTime was the only operator that behaved predictably, stayed up to date, and did not make you wait.
Here's a break down of the five *Time operators:
Is your feature request related to a problem? Please describe.
I'm always frustrated when I have a sequence of user interaction events that cause server requests and I want to limit the frequency of the server requests while keeping a good user experience. A good user experience means:
Describe the solution you'd like
Restore inspect and inspectTime operators.
Describe alternatives you've considered
The other four *Time operators. It was suggested here that people can use withLatestFrom to somehow get "close" to inspectTime, but it's not clear to me how this is to be done. @staltz claims here that inspectTime can be fully replicated with withLatestFrom. I don't believe this is true. Even if it is true (please educate me if it is so), consider that it might be difficult enough to justify including inspectTime anyway.
(If this is new operator request) describe reason it should be core operator
Again, it seems like you removed the best of the five operators. It doesn't make sense to me.
The text was updated successfully, but these errors were encountered: