-
Notifications
You must be signed in to change notification settings - Fork 128
Finder should prioritize order based on most frequently used. #150
Comments
👍 |
When do you want it to prioritize order in this way? Before you start typing anything? Only on ties? Or do you want it to do some sort of weird partial sort where even a closer typed match could be beaten by a file used more often? |
Behavior-wise, I would probably want caching for the files that I search when that project is open. During that session, files that open more would gain additional weighting, something like a history weighting. In the beginning all files can have the same weight. Eventually, this weight will shift depending on the opened history. It could be duration opened, how many times opened, etc. I would imagine the ranking algorithm currently has its own weighting. (I have no idea how this sorting works haha). This could be another weight. In terms of the balance, I guess that would take some finagling. So tl;dr, probably the third option. If Atom preserved project/repo cache files, there could even be a more persistent history. |
I think we would have to be really, really careful to not break people's expectations if we were going to weight things on something other than "best match". /cc @jeancroy (who did a bunch of work on enhancing the fuzzy match algorithm recently in atom/fuzzaldrin#22) |
Yeah, that's a non obvious request because if two path are different, then we should be able to select one of them based on the query. So it's more of a productivity shortcut, than something required to select a file. What was supper useful in making fuzzaldrin-plus was TONS of user report. That put a collective definition on what is intuitive behavior. Unfortunately there's no such thing now for recency / frequency boost. Whatever we end up doing, I'm pretty sure the final form will be a narrow peak. For example autocomplete plus boost the score of result near insertion point, but it's mostly effective a few line before and after the cursor. For fuzzy finder, I'm thinking it's possible to boost a few file among the recent / frequent files. As for the technical side I had a brain dump not too long ago on managing frequency count |
Would something like that make sens ?
I'm talking from the POV of fuzzaldrin-plus where score grow with number of character typed. I'm tempted to use this as backstory. Aka the user search for |
A few things which I think should give a recent-based bonus:
I also really like the idea of a frequency based bonus. If atom can remember how many times I've opened application_controller.rb, it can promote it above application.rb when I type |
I think it should already be the case. Are you using the alternate scoring ? |
I am, and it is, but what if application.rb were the more common one? I picked a bad example, but I do still run into this occasionally. |
From a design standpoint example of the problem we are trying to solve is very useful.
very interested to hear about such user stories. |
BTW, the Slack engineering blog recently posted an article about how they optimized the channel switcher in Slack and included a "frecency" algorithm in it. |
My 2 cents: when the best match has a filename that is the same for other found files (e.g. when having multiple projects with same/similar files), just return the last accessed one. From my view, I do not think this is against anybody's expectations. Please correct me if I'm wrong. (This sorting algorithm should be very simple to implement and requires no extra weighting magic) |
@juanmirocks I can see where this algorithm would give me not the best result. Let's say I'm working on a ruby project. I make some changes to the Gemfile (the dependencies file) in my project, but then have to switch gears. So I add another (related) project to the workspace. I open up a few files for project 2. Then I use the fuzzy finder to search for Gemfile. What you propose would have the most recently accessed Gemfile show up first in the list. However, I've switched to working on the second project, and would like to see the Gemfile for the project I've worked in most recently. I don't think there's a best answer for this case. Sometimes I'll want to refer back to project 1's Gemfile, sometimes I'll want to move on to project 2's Gemfile. The problem only gets worse if you have a top level folder for all the projects you work on and you open that at the start of your day. |
@calebmeyer I see your point. I don't know if the Atom API records the access date of the last accessed project... Nonetheless, I still see as either your proposition or yours more sensible than the current one. The current approach pretty much seems random when the match is just a filename (and not its directory path), which I guess is very common. If that's the case, currently, the shown order is... what? I see no logic in that. So giving a more sensible to same-filename matches makes sense to me. Either my proposition, yours, or both or other simple ways via configuration. I'm very much willing to submit a pull change with this. It would solve me lots of time in finding my files. |
Are we not able to implement a “Frecent” (frequent and recent) method like z does? |
Similar to Google's search omnibar. I open some files way more than others, and would like those files to be at the top of my results list.
The text was updated successfully, but these errors were encountered: