fix: Grid making unnecessary onSelectionChanged calls#2471
Merged
mattrunyon merged 2 commits intodeephaven:mainfrom Jun 24, 2025
Merged
fix: Grid making unnecessary onSelectionChanged calls#2471mattrunyon merged 2 commits intodeephaven:mainfrom
mattrunyon merged 2 commits intodeephaven:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2471 +/- ##
==========================================
- Coverage 47.27% 44.58% -2.69%
==========================================
Files 727 757 +30
Lines 39767 42397 +2630
Branches 9949 10847 +898
==========================================
+ Hits 18800 18903 +103
- Misses 20956 23483 +2527
Partials 11 11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bmingles
reviewed
Jun 24, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Needed as part of DH-19292 to ensure we don't emit duplicate selection events. Even with debouncing, we might emit the event, and then emit the same selection (in a different array reference) on mouse up. This fixes that so we don't emit the unnecessary events if the mouse up did not remove selections
There are still some quirks around the selection events like when using ctrl+click+drag to deselect part of a range,
onSelectionChangedis emitted with the subtracted portion as an extra range (e.g.,[[0, 5], [1, 2]]) until mouse up which commits the selection and removes the overlapping ranges ([[0, 0], [3, 5]]). On the dh.ui side I'm just consolidating the ranges, but would probably be good to fix that at some point.