-
-
Notifications
You must be signed in to change notification settings - Fork 282
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
Add QuickLook support #2082
base: dev
Are you sure you want to change the base?
Add QuickLook support #2082
Conversation
- Adapted from Files
- Internal and external preview can't open at the same time - Always preview option doesn't control external
This comment has been minimized.
This comment has been minimized.
Just got a chance to test run this. It looks very good! I have a few opinions on some of your problems listed:
I don't think this works well with quick look as both windows overlap.
I think we can resolve this by greying out this option if a QuickLook installation is not detected. This can be tricky though as QuickLook is available in many different forms including the Windows app store. Instead of tracking all this down we could send a pipe message and check its status to see if quick look is available and determine to enable the option.
This was also an issue with the original PR. |
QuickLook functionality should be provided fully by a plugin. To achieve this we need to use this #1013, and this pr is a working POC already. |
I don't think @VictoriousRaptor was around for that. But yes as a plugin would be ideal. Also I would use this PR in favor of my older code. This is more fleshed out. |
Maybe best that @VictoriousRaptor just continue work as is with this one so we can keep the momentum, once I helped onesound I will come back to finishing off that pr 1013 and migrate the finished code here into a plugin. |
Ok I'll do some more tests on this PR and try to figure out the problems. |
Greying out option is good. And what if user enables this option (with QuickLook installed and running), and then quit QuickLook and preview in Flow? Should we fallback to Flow's preview? And what kind of message to tell users we are not able to launch QuickLook? Maybe a notification toast?
Not a big deal. Just manually set it once and for all. |
Hi, @VictoriousRaptor, |
You can use the artifact build, but I think they expire now. |
Sorry I didn't see this message earlier. I just updated the branch and you can download the artifact build now. |
what's left for this one? |
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.
This is good to demonstrate it can work, but I am not fond of having Quicklook specific code in the codebase for several reasons but main one is this doesn't extend/enable flow to be more capable.
I would still say use this PR #1013 to allow plugins to capture keyboard shortcuts so they can do more, and move this Quicklook specific code into its own plugin.
That makes sense. Though before we can capture the keystroke and have a relatively sophisticated model for registering hook for plugins, I think it's ok to temporarily make this inside the core? |
Not that complicated, it's using the same model as what we currently have. My main concern is to release this then having to take it away and have users install a plugin instead. |
Is this done? I haven't tested it. If it works, let's just include it. |
Last time I tested it it has some bugs and there is no support for downloading and installing Quicklook for user. |
Maybe the best idea is to use a separate hotkey to trigger QuickLook. Resolving conflicts with QL and our preview is annoying. |
Can't this be detected from user settings, preview -> built-in or QuickLook |
This is the current implementation but logic to deciding to use which preview is not clear. I spent quite a lot of time on it. I don't have time to review this PR this week so if we want to merge now it requires more detailed review from the team. |
Updated this PR with (see commits):
|
Refined version of #859. Too many merging conflict so I just create a new branch instead. Compatible with our preview function.
Changes
FilePath
forResult.Preview
to indicate what file should QuickLook preview.Behavior
Preview.FilePath
try to use QuickLook to preview.Preview.FilePath
pressing hotkey only triggers QuickLook.Problems
Should "Always Preview" open QuickLook?NoWhen "Always Preview" is on (which means internal preview is on), selecting another result that can use QuickLook triggers QuickLook. Looks bad.When "Use QuickLook" is on but QuickLook is not launched or installed what kind of warning should be send to users?Send a notificationNo QuickLook API to set on top. (Open selected result in quicklook #859 (comment))Manually set it.Switching from external preview result to builtin result doesn't properly trigger builtin preview.TODO