Skip to content

Split ThrottledFunc into Leading and Trailing variants#10133

Merged
2 commits merged intomainfrom
dev/lhecker/throttled-func
May 20, 2021
Merged

Split ThrottledFunc into Leading and Trailing variants#10133
2 commits merged intomainfrom
dev/lhecker/throttled-func

Conversation

@lhecker
Copy link
Member

@lhecker lhecker commented May 19, 2021

Summary of the Pull Request

This replaces ThrottledFunc with two variants:

  • ThrottledFuncLeading invokes the callback immediately and blocks further calls for the given duration
  • ThrottledFuncTrailing blocks calls for the given duration and then invokes the callback

References

PR Checklist

  • I work here
  • Tests added/passed

Validation Steps Performed

  • Ensured scrolling still works

@lhecker lhecker requested review from DHowett and PankajBhojwani May 19, 2021 20:07
@lhecker lhecker marked this pull request as ready for review May 20, 2021 17:12
@lhecker lhecker added Area-Quality Stability, Performance, Etc. Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Product-Terminal The new Windows Terminal. AutoMerge Marked for automatic merge by the bot when requirements are met labels May 20, 2021
@ghost
Copy link

ghost commented May 20, 2021

Hello @lhecker!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 13f0b8e into main May 20, 2021
@ghost ghost deleted the dev/lhecker/throttled-func branch May 20, 2021 17:31
DHowett pushed a commit that referenced this pull request May 24, 2021
This replaces `ThrottledFunc` with two variants:
* `ThrottledFuncLeading` invokes the callback immediately and blocks further calls for the given duration
* `ThrottledFuncTrailing` blocks calls for the given duration and then invokes the callback

* #9270 - `ThrottledFuncLeading` will allow the pane to flash immediately for a BEL, but block further BELs until the animation finished

* [x] I work here
* [ ] Tests added/passed

* [x] Ensured scrolling still works

(cherry picked from commit 13f0b8e)
@ghost
Copy link

ghost commented May 25, 2021

🎉Windows Terminal v1.8.1444.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented May 25, 2021

🎉Windows Terminal Preview v1.9.1445.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Quality Stability, Performance, Etc. Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) AutoMerge Marked for automatic merge by the bot when requirements are met Product-Terminal The new Windows Terminal.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants