-
Notifications
You must be signed in to change notification settings - Fork 20
Added native support for quicklook #18
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks, It's a fantastic addition! Would look into it tonight. |
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.
Pull request overview
This PR adds native macOS QuickLook support to replace the qlmanage command-line tool approach. The native implementation provides better video preview support and integrates more seamlessly with the application's UI through custom event handling and state management.
Key changes:
- Implements native QuickLook API integration using
objc2bindings for macOS - Adds three new Tauri commands:
open_quicklook,toggle_quicklook, andupdate_quicklook - Introduces QuickLook state management in the frontend to track when QuickLook is active
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 16 comments.
Show a summary per file
| File | Description |
|---|---|
| cardinal/src-tauri/src/quicklook.rs | New module implementing native QuickLook panel management with event interception for keyboard and mouse handling |
| cardinal/src-tauri/src/commands.rs | Replaces preview_with_quicklook command with three new commands for opening, toggling, and updating QuickLook preview |
| cardinal/src-tauri/src/lib.rs | Updates module declarations and command registration to include new QuickLook commands |
| cardinal/src-tauri/build.rs | Adds QuickLook framework linking for macOS builds |
| cardinal/src-tauri/Cargo.toml | Adds objc2 ecosystem dependencies for macOS API interop |
| cardinal/src-tauri/Cargo.lock | Lock file updates for new dependencies |
| cardinal/src/hooks/useContextMenu.ts | Updates context menu to call open_quicklook and accept optional callback for QuickLook activation |
| cardinal/src/App.tsx | Adds QuickLook state management, Space key handler for toggling, and Escape key handler for tracking state |
| cardinal/src/App.css | Defines CSS styles for QuickLook active mode, including row selection and hover behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
Yes, |
b8feed3 to
1640707
Compare
|
@ldm0 Is that ok PR for u? |
Thanks for the suggestion! I will look into it and it's awesome you have done some investigation.
Yes, this is a good feature, I am trying to understand it and tweak it. For example, the event monitor you add are trying to propagate the arrow key event to cardinal main window(I think it's a nich catch to sync the behaviour with Finder), but currently it's not working on my mac. I am investgating the underlying issue. |
By default Here small example how it works Monosnap.screencast.2025-11-28.11-43-30.mp4 |
This is native support for quicklook, because
qlmanageisn't good solution, for example u cannot to get preview for video (will be throw error).