Skip to content

Folder previewΒ #575

Closed
Closed

Description

@adyanth

When previewing a folder, it is way better to show contents of the folder along with those macOS like folder dropdown (with a triangle to click to expand the folders) rather than showing the last modified which is almost useless information.

Seer does this as well, but well, it is paid.

Activity

  1. xupefei commented on Nov 13, 2019

    @xupefei
    Member

    It is actually quite easy to write a plugin for previewing folders based on existing codes of the ArchiveViewer, but unfortunately no one want to contribute...

  2. rabelux commented on Sep 24, 2020

    @rabelux
    Member

    Duplicate of #491

  3. mooflu commented on Jan 2, 2021

    @mooflu
    Contributor

    I took a stab at it here: master...mooflu:origin

    Not sure I like it. Maybe useful when scanning a bunch of items/folders.
    For the single case it's not really any better than opening folder in explorer.

    Maybe if it was more like OSX stacks grid and the QL window opened up near the folder as a way to quickly access an item and QL window closes once you open/select an item.

  4. adyanth commented on Jan 3, 2021

    @adyanth
    Author

    It is helpful since 1. Quicklook opens faster/smoother than explorer 2. When you want to open a deeply nested file/folder, double clicking 10 times is a pain, and you cannot see the contents of the previous folder at the same time.

    @xupefei Do you have a README for the build so I can try it out (New to C# and windows app dev in general here πŸ˜…)? Or if you can build a nightly by taking a pull request from @mooflu here?

  5. adyanth commented on Jan 3, 2021

    @adyanth
    Author

    It is working great!
    I forked this and added mooflu's branch here and saw that you have appveyor setup, so made a free account and here is the build artifacts.

    One small issue I noticed, the files don't show their icons, which I can confirm even the Archive Previewer does not. So, this is looking damn good! Thanks @mooflu and @xupefei please check if this can be added as a core functionality in the next release πŸ₯³

  6. adyanth commented on Jan 3, 2021

    @adyanth
    Author

    Can you think of a way to open the folder on double click or maybe enter? This is helpful if you have already gone down the rabbit hole of folders and want to open one of those in explorer. I see that the double click it tied to opening the top folder, and there are global hooks to Enter. Maybe a possibility of a right click?

  7. xupefei commented on Jan 3, 2021

    @xupefei
    Member

    @mooflu Great work and thanks for @adyanth's build πŸ‘
    Minor comments:

    • When previewing a Drive (e.g. C:\) the counting is very slow. Maybe to ignore Drives in the Plugin interface (return false when Path.GetPathRoot(path) == path)?
    • I suggest to move the plugin to a standalone repo forked from https://github.com/QL-Win/QuickLook.Plugin.HelloWorld. This allows further dead code removal (remove codes only used in the ArchiveViewer) and a standalone distribution of this new plugin.

    the files don't show their icons

    The ArchiveViewer is designed to show the default icon of each file type since getting the real icon needs to decompress files. For this new plugin, it is possible to get real icons at the cost of delaying loading speed, unless icons are shown in a async way.

  8. adyanth commented on Jan 3, 2021

    @adyanth
    Author

    It is reasonably fast (~1-2s) on my D: drive which is larger and containing more data than C: but yes, very slow on C: due to the sheer count of files there. Yeah, stopping it for root filesystems would help.

    I will try my hands on C# dev with this then, will try to create a module from hello world. (Not sure how forking that is useful, but will use it as a template)

    Also, I thought that the folder preview would kind of be like the core, but yeah, a standalone plugin is good as well!

  9. mooflu commented on Jan 3, 2021

    @mooflu
    Contributor

    A folder-preview plugin sounds right. Not sure if an external plugin makes debugging harder - it was nice to run the whole thing in debug mode. I guess that's mostly bundling and I could keep a branch with the new plugin inside the main project.

    Re: opening folder in explorer.
    It currently saves the full path only for files and the click handler checks if a file exists before it opens it.
    So it should be easy to allow folders: add full path for folders and remove file check since we know it exists.
    Default for double click is to open the tippy, so it may be a bit surprising when it opens the folder externally.
    Probably ok, though, since you can still open by clicking the tippy icon or right arrow via keyboard.

    Re: folder scan
    It would be better if it dynamically loaded as you tippy open a folder - no overall stats, though.

  10. xupefei commented on Jan 3, 2021

    @xupefei
    Member

    Not sure if an external plugin makes debugging harder - it was nice to run the whole thing in debug mode

    Debugging a plugin is not harder:

    1. Set the plugin build path to Debug\QuickLook.Plugins\QuickLook.Plugin.FolderViewer\ (to maintain the dir structure -- QL loads plugins from this folder).
    2. Copy a QuickLook executable (with dependencies) to Debug\.
    3. In plugin debugging tab, set executable to Debug\QuickLook.exe.
    4. Start a debugging. VS will attach to QuickLook.exe and pause at any breakpoint in the plugin code.
  11. mooflu commented on Jan 4, 2021

    @mooflu
    Contributor

    I've made some of the suggested changes.

    • FolderViewer as its own plugin
    • no preview when it's the root
    • double click on folder opens it in explorer
    • use "real icons"

    WIP here: https://github.com/mooflu/QuickLook/tree/folder-preview/QuickLook.Plugin/QuickLook.Plugin.FolderViewer

  12. adyanth commented on Jan 4, 2021

    @adyanth
    Author

    @mooflu That was quick and impressive!
    I am messing with what you have written, and I don't see a way to either use the QuickLook's keyboard hook or closing the panel once the double click handler runs on the Plugin/FileListView. Any idea what can be done here?

    Here is the repo separated and cloned from the HelloWorld plugin, and the qlplugin here if anyone wants to try!

  13. mooflu commented on Jan 4, 2021

    @mooflu
    Contributor

    @adyanth Thanks for making a separated version. The readme says it's MIT but the source code is GPL. The is also true for the hello world plugin which uses QuickLook.common (GPL).

  14. xupefei commented on Jan 4, 2021

    @xupefei
    Member

    @mooflu Good point. I'll update QuickLook.Common to use MIT. Then @adyanth can update the submodule.

  15. adyanth commented on Jan 5, 2021

    @adyanth
    Author

    I still see both QuickLook.Common and the Hello world example are on MIT. The commit for Common I am referring to is already on MIT (I think?). Should I make any changes?

    @mooflu Feel free to create your own repo if you need to, and I will fork from yours. I wanted to keep track of any changes I do, so created a repo.

  16. xupefei commented on Jan 5, 2021

    @xupefei
    Member

    @adyanth I updated QuickLook.Common from GPL to MIT. HelloWorld is already on MIT. So you have to update the submodule in the FolderViewer so that your code references to the MIT version of QuickLook.Common.

  17. adyanth commented on Apr 8, 2021

    @adyanth
    Author

    @mooflu would you like to add it to the official plugin list here? I have been using it for around 3 months now without issues! Once done, I guess this issue can be closed along with all the other duplicates.

  18. rabelux commented on Apr 11, 2021

    @rabelux
    Member

    Please correct me if I'm wrong, but I think there are two kinds of plugins. One are "internal" plugins that get shipped with QL, the others are "external" ones that need to be downloaded and installed. You @adyanth built an external plugin whereas @mooflu's approach need's to get merged to be be included. Did I get that right?

  19. adyanth commented on Apr 11, 2021

    @adyanth
    Author

    Correct, I extracted the changes by @mooflu to an external plugin so that I can test it, and as per @xupefei 's point 2 here.

  20. rabelux commented on Sep 20, 2021

    @rabelux
    Member

    I'll close this and refer to adyanth's solution with an installable plugin available here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions