atom / fuzzy-finder

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

Don't wait for items to be updated before showing fuzzy finder #293

Closed as-cii closed 7 years ago

as-cii commented 7 years ago

Fixes #288.

Previously, we were waiting until the items had been populated before showing the fuzzy finder. However, this was causing an odd UX experience that made users accidentally type query characters into already opened buffers.

With this pull request, on toggle, we will show the fuzzy finder synchronously and only then request an animation frame where we populate the items.

/cc: @atom/maintainers

Ben3eeE commented 7 years ago

I was able to consistently reproduce the issue by opening the fuzzy-finder right after launching Atom. I used a folder located on a network share that is slow. I tested 7 times with and without this PR. Without it reproduced 7/7 times (100%) and with this it didn't reproduce. Both have the same delay before the view is shown for me.

I'll keep this linked to keep testing 👍 🚢

as-cii commented 7 years ago

Thanks, Linus! ❤️

dwelle commented 7 years ago

Has this already landed? It seems so, because the bug doesn't happen to me after editor loses focus, anymore. But it still happens after clean atom start (and possibly in few other cases that I can't repro).

Ben3eeE commented 7 years ago

It landed in 1.17.0-beta5. I tested both with a clean start of Atom and with the window losing focus and was not able to reproduce this bug.

dwelle commented 7 years ago

Huh.. I'm on stable, and it did seem weird that there was no patch bump, so there's that. But no idea why it started working well for me for the atom defocus/focus case. Before, it never opened before re-index, while now it always does, so I thought the patch must have already landed.

Ben3eeE commented 7 years ago

@dwelle I had the same thing happen to me where defocus/focus case suddenly started working :grinning: It might have been something external that was slowing down Atom enough to cause this problem for me. Since this PR I have not reproduced it in either case and the defocus case did happen fairly regularly for me.

Thank you for updating that you are on stable :bowing_man: This has not been fixed in Atom 1.16 so it's expected you still experience this issue if it is also an issue on Atom 1.16. Let us know if you experience problems when using Atom 1.17 :zap: