Repository navigation
[dev-v5] Add Debounce - #2656
Merged
Merged
Conversation
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 99.2%
|
Collaborator
Author
|
Vincent Baaij (@vnbaaij) Which class do you prefer?
|
Collaborator
|
I would be inclined to go with a |
Collaborator
Author
|
Oh. I would have taken the Timer to follow UWP 😁 |
Collaborator
Author
|
The usage of these 2 classes is identical. I propose to use |
Denis Voituron (dvoituron)
marked this pull request as ready for review
September 16, 2024 10:16
Denis Voituron (dvoituron)
requested a review
from Vincent Baaij (vnbaaij)
as a code owner
September 16, 2024 10:16
Vincent Baaij (vnbaaij)
requested changes
Sep 16, 2024
Vincent Baaij (vnbaaij)
approved these changes
Sep 16, 2024
This was referenced Sep 28, 2026
Closed
Merged
Merged
Closed
This was referenced Oct 14, 2026
This was referenced Oct 15, 2026
Closed
Closed
This was referenced Oct 28, 2026
Closed
This was referenced Nov 9, 2026
This was referenced Nov 23, 2026
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[dev-v5] Add Debounce
The Debounce dispatcher delays the invocation of an action until a predetermined interval has elapsed since the last call.
This ensures that the action is only invoked once after the calls have stopped for the specified duration.
I created 2 classes:
DebounceActioninspired from Microsoft.Toolkit.Uwp.UI.DispatcherQueueTimerExtensions and usingSystem.Timers.TimerDeboundTaskinspired from blog posts and usingSystem.TaskThe usage is identical, but I propose to use
Debounce: DebounceTask. With the option of upgrading to the second class if problems are detected (to avoid losing this code).And in some weeks, we could delete the second class to keep only one.