feat: allow chainable msg filters; add MouseThrottleFilter
Changes in this PR
Made some tweaks to message filtering, as I think this will help others. If y'all don't think it will be too useful, or would rather approach it a different way, feel free to close this out.
- Converted
WithFilter(filter)toWithFilters(filters...)to allow chainable filters, with aMsgFiltertype to clean things up a little. - Added an out-of-box
MouseThrottleFilterfilter, to cover throttling of high-frequency mouse messages. This logic is also used in crush here, and one of my apps, and I suspect such functionality will help others improve performance when they don't need the high-frequency tracking.
- [x] I have read
CONTRIBUTING.md.
Codecov Report
:x: Patch coverage is 4.54545% with 21 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 56.26%. Comparing base (55b3503) to head (59d353c).
:warning: Report is 1 commits behind head on v2-exp.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| options.go | 4.54% | 19 Missing and 2 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## v2-exp #1544 +/- ##
==========================================
- Coverage 57.28% 56.26% -1.03%
==========================================
Files 25 25
Lines 1201 1221 +20
==========================================
- Hits 688 687 -1
- Misses 436 455 +19
- Partials 77 79 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Tests currently breaking due to https://github.com/charmbracelet/bubbletea/blob/f60735dff10c208b3398dde25a39b1d27eb6d266/examples/go.mod#L7
Tests currently breaking due to
https://github.com/charmbracelet/bubbletea/blob/f60735dff10c208b3398dde25a39b1d27eb6d266/examples/go.mod#L7
I removed this in the latest v2-exp commit