ghiscoding / slickgrid-universal

Slickgrid-Universal is a monorepo which includes all Editors, Filters, Extensions, Services related to SlickGrid usage and is also Framework Agnostic
https://ghiscoding.github.io/slickgrid-universal/
Other
89 stars 29 forks source link

feat(core): add new `preventDragFromKeys` grid option, fixes #1537 #1538

Closed ghiscoding closed 5 months ago

ghiscoding commented 5 months ago
stackblitz[bot] commented 5 months ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

ghiscoding commented 5 months ago

@zewa666 I wouldn't mind a review on this PR since I know you use this feature too and want to make sure it's safe to do so. See #1537 for more info. I'm not sure if the name preventDragFromKeys is meaningful enough though, however I do want to keep it short (with time I realized that super long prop name are never minimized, so better keep it short)

Side note, it turns out that the over the top answer I provided to the SO with SQL LIKE, was so happy that he sent me a bunch of Ko-Fi ☕, so I'm happy too 😉

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.8%. Comparing base (a2799f2) to head (7f5223b). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1538 +/- ## ======================================== + Coverage 99.8% 99.8% +0.1% ======================================== Files 198 198 Lines 21661 21665 +4 Branches 6965 7240 +275 ======================================== + Hits 21600 21604 +4 Misses 61 61 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ghiscoding commented 5 months ago

I might need to change the keys to only prevent drag on Ctrl key and leave Shift as allowed to drag. Since that seems to cause friction by the user in the discussion

zewa666 commented 5 months ago

I've tried out the stackblitz PR review and did so for both Example 17 and Example 19 where I had somewhat similar issues. Both work fine. I couldn't replicate the shift behavior as mentioned in the other discussion but holding shift and clicking around in general causes weird text selections to happen so I didn't give that much thought anyways. But since it's configurable I don't see any big issues with not including it as default since the consumer can always decide which keys to take