-
Notifications
You must be signed in to change notification settings - Fork 723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(brush): add using widows move events with brush #1164
Conversation
Oh, it seems that my linter didn't get all issues here. I'll provide lint fixes tomorrow. |
@williaster Ready for review. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @d3x42 thanks for getting this started!
I had a few specific comments to start, and my main high-level question is whether we need to introduce isMovingBrushSelection
and brushHandleChange
, or whether we can simply use the existing isBrushing
flag. If you could explain this design choice more it'd be helpful.
It was separated because I need to determine which event would be handled by the mouse move event listener (logic from move handlers in the child components slightly different). I think that I could use one enum variable instead of multiple boolean. Something like brushingType: Moving|Brushing|Resize_left|Resize_Right etc. |
@williaster It seems that I resolved all of your comments. Please check when you have time. |
Hey @d3x42 sorry for such a long delay, have been super slammed at work and out a bit on vacation. Will try to get this reviewed by end of week 🙏 |
@williaster gentle ping |
Hey @d3x42 thanks for the ping. I just pulled this branch locally to play with it functionally (by setting Jumpy-ness when moving the brush on the track Jumpy-ness when moving the brush outside the track How were you testing this functionally? I think these will need to be fixed before we can merge it, but thanks again for all the work on improving this 🙏 |
@williaster Sorry for the bug with jumping on move starts, it should be fine now. Resize works fine for me. I checked it in chrome, firefox and safari on macOS. Could you add some details on your os, browser, and browser version to reproduce it? |
Hey @d3x42 I pulled it again and it's no longer jumpy/works well when dragging outside of the svg 🎉. Still can't resize tho, I tried it on chrome/firefox/safari and same behavior for each. I'm on So locally I was running To verify, when |
@williaster Thanks! After rebuilding @visx/drag without esm I was able to reproduce the issue. Fix already here. |
Hey @d3x42 I can resize now, but noticed a jumping issue during the transition between the |
@williaster I fixed jumpings on resizing and selection |
@weibohe Hi! Any news on the review for this PR? |
Merge master changes to branch. @williaster could you please take a look on this pr? |
@williaster gentle ping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @d3x42 sorry for the delay on my end, I have been super busy but I appreciate the pings. I think this is close, just a couple more comments on my end for readability.
don't worry about happo failing, we are having some auth issues with it. |
also played with it functionally and looks good, do you want to set |
Co-authored-by: Chris Williams <[email protected]>
Co-authored-by: Chris Williams <[email protected]>
Co-authored-by: Chris Williams <[email protected]>
Co-authored-by: Chris Williams <[email protected]>
Sure! I'll update the demo. :) |
@d3x42 PR updated with your suggestions.) "isControlled" definitely way better for child components in Brush. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I think this is probably the final review. Sorry for multiple review rounds but this one is definitely more complex than some.
Thank you for all the hard work on this, it's a significant improvement to the current UX! 👏 I think after these changes we can merge this puppy! 🚢
@williaster PR updated. Multiple reviews rounds fine for me, they really make this PR better.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, lgtm! 😍 Thank you again 🎉
🎉 This PR is included in version |
Hey, i saw this pr superseded #864 , but i'm pretty sure it doesn't. |
@sakulstra that's correct, this is being tracked in #845 . Fix is out now in #1286 . |
The new param isUseWindowMoveEvents will allow window event listeners to control dragging move and end.
🚀 Enhancements
It's possible to move the cursor away from the brush area (and finish brushing there).
Related PR and issues:
PR: PR-1110
Issue: #1109
My goal here - in the "isUseWindowMoveEvents" mode handle all mouse movements and mouse up events on the Base Brush component level. If there are examples for BrushCorner in the gallery I could try to handle it too.