-
Notifications
You must be signed in to change notification settings - Fork 449
[fix] Enable mouse gestures over video previews #5279
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
Conversation
…oom and space+drag panning 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
🎭 Playwright Test Results✅ All tests passed across all browsers! ⏰ Completed at: 09/03/2025, 04:35:39 AM UTC 📊 Test Reports by Browser🎉 Your tests are passing across all browsers! |
🎨 Storybook Build Status❌ Build failed! ⏰ Completed at: 08/31/2025, 04:12:59 AM UTC 🔗 Links |
DrJKL
left a comment
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.
I don't love all the casting, but it's definitely better 👍🏻
DrJKL
left a comment
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.
Still good, getting even better
… tests
- Replace 'as any' with vi.mocked({partial: true}) for store mocks
- Use 'satisfies Partial<Event>' for better event type checking
- Remove 'not.toThrow' test as it tests default behavior
- Improve test readability and type safety per review feedback
- Replace vague 'graceful handling' test with specific 'early return' test - Verify that getCanvas() is actually called to check canvas existence - Test early return behavior when canvas is null rather than just preventDefault side effect - More robust test that validates the intended logic flow
DrJKL
left a comment
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.
👍🏻
- Replace global mockGetCanvas and mockGet with in-situ vi.mocked() calls - Extract store functions directly in test cases for better locality - Follow DrJKL's suggestion for cleaner test structure - Maintains same test coverage with improved readability
* [fix] Enable mouse gestures over video previews - fixes ctrl+scroll zoom and space+drag panning 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]> * [improve] Enhance code clarity in media gesture handling with descriptive constants * [clean] Remove dangling comment in handlePointer method * [improve] Use satisfies and partial mocking for better type safety in tests - Replace 'as any' with vi.mocked({partial: true}) for store mocks - Use 'satisfies Partial<Event>' for better event type checking - Remove 'not.toThrow' test as it tests default behavior - Improve test readability and type safety per review feedback * [improve] Test actual canvas existence check instead of side effects - Replace vague 'graceful handling' test with specific 'early return' test - Verify that getCanvas() is actually called to check canvas existence - Test early return behavior when canvas is null rather than just preventDefault side effect - More robust test that validates the intended logic flow * [refactor] Use localized mocking instead of global mock functions - Replace global mockGetCanvas and mockGet with in-situ vi.mocked() calls - Extract store functions directly in test cases for better locality - Follow DrJKL's suggestion for cleaner test structure - Maintains same test coverage with improved readability --------- Co-authored-by: Claude <[email protected]>

Summary
Technical Details
useCanvasInteractionscomposable withhandlePointermethoduseNodeVideoread_onlyproperty)2025-08-30.21-00-05_processed_20250830_210057.mp4
Related:
┆Issue is synchronized with this Notion page by Unito