atom / fuzzy-finder

Find and open files quickly
MIT License
274 stars 138 forks source link

Preview selected files in list #5 #182 #368

Closed pheen closed 5 years ago

pheen commented 5 years ago

Description of the Change

It has been brought up in a few issues and PRs (#113, #313) that having a Sublime Text like preview in the fuzzy finder would be helpful. This implementation should behave identical to Sublime's finder preview.

didChangeSelection gives a callback for user query changes in the fuzzy finder, and fortunately after that Atom's existing pending panes can handle the hard part.

Alternate Designs

didChangeSelection is a little awkward to use because it's called more often than exactly when a user makes a change. For example when initially opening the fuzzy finder it can be called twice, so this.showNextPreview is needed to skip those events. I think a better solution would involve changes to SelectListView which is probably more than this issue warrants.

Benefits

Allow possibly faster/easier decision making when selecting files, especially when searching for similar items. Also to make Sublime Text users happy :)

Possible Drawbacks

There should be no impact when the feature is disabled. I haven't noticed any issues so far when enabled.

Applicable Issues

5, #182

Mar-10-2019 03-44-40

lee-dohm commented 5 years ago

Thanks for opening this PR and for the hard work you put into it.

Upon reviewing with the team today, we've decided that we don't want to own this functionality because of the various performance and stability impacts that it could have on the fuzzy-finder package. For example, what if you type some characters that match the data files in a particular directory that are 5GB each? For this reason, we're not going to accept this PR and we're closing the related issues.

However, we are going to open an issue for someone to create a provided service that could allow other community packages to integrate with fuzzy-finder to provide this behavior. We would be open to reviewing an RFC for a design of this proposed service in atom/fuzzy-finder. If you or anyone is interested in working on this, please open a new issue for the RFC for review by the maintainer team.

Thanks again for your hard work and wanting to make Atom better.