Skip to content

Improve sorting of search results during quickMove / quickJump #82

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

Closed
RealRaven2000 opened this issue Dec 3, 2020 · 4 comments
Closed
Assignees

Comments

@RealRaven2000
Copy link
Owner

RealRaven2000 commented Dec 3, 2020

Wenn ich eine eMail weg sortiere oder auch nur einen Ordner suche, dann werden die Treffer nicht alphabetisch, sondern nach Zeichenlänge sortiert angezeigt.
Ich würde jedoch gerne die Treffer-Anzeige in alphabetischer Reihenfolge angezeigt bekommen, da ich so meinen passenden Ordner weit schneller finden könnte.

image

Search results are matched based on different variables, one of them being matching string length - this leads to very similar results being ordered by short to long string length. The user would expect similar folders (especially those with a common parent folder) to be sorted alphabetically.

@MichaelJFischer
Copy link

Two observations/comments:

  1. The order of listing must depend on the information available when the list is created. I'd like the most recently used to always appear first, but what does "used" mean? It could mean the time when the user clicked on a file in QF's list; it could mean the timestamp that TB presumably keeps on each file, which often gets updated behind QF's back. I don't know what information is even available to QF.
  2. One size might not fit all. Different people structure their folders differently. I have my mail archives structured by year and would want that as a primary sort key (assuming most-recently-used is not feasible), but I understand that others might well prefer the leaf file name as the primary key. Maybe sort-order needs to be a settable preference?

@RealRaven2000 RealRaven2000 changed the title Improve suggestions list during quickMove Improve search results list during quickMove Jan 18, 2021
@RealRaven2000
Copy link
Owner Author

Two observations/comments:

  1. The order of listing must depend on the information available when the list is created. I'd like the most recently used to always appear first, but what does "used" mean? It could mean the time when the user clicked on a file in QF's list; it could mean the timestamp that TB presumably keeps on each file, which often gets updated behind QF's back. I don't know what information is even available to QF.

There is a built in single time stamp or every folder, that is being updated, see also issue #80 for some of the actions I had to take to fix the recent folders updating correctly when emails are being dropped to the folder tree. I added a folder listen but excluded certain special folders (e.g. draft / trash / archive) becuase they would otherwise always be on the top of the "recent folders" list.

  1. One size might not fit all. Different people structure their folders differently. I have my mail archives structured by year and would want that as a primary sort key (assuming most-recently-used is not feasible), but I understand that others might well prefer the leaf file name as the primary key. Maybe sort-order needs to be a settable preference?

If there is a complex / diverse / granular way to configure the results we would still need to define the various possible algorithms (and I would need to build a UI that the user easily understands). Starting with alphabetic order is probably more helpful - at the moment I have different scores when you enter 3 letters or more (in that case I allow matching of text within the string) - with only 2 characters I only look at the start of word boundaries IIRC. I think the length match was probably one attempt to be a little more heuristic but I didn't do a great job there. I thought the longer the matched part the better the result, but I don't think this works as expected.

The Mozilla Debugger has a quite interesting way of matching file names, where the letters do not have to be adjacent when you are looking for a file. So in your case you could type "Ce352x" in order to match "Centrum35_2xLED-Display_GPS-Problem" or "Cengps". quickMove only looks for the exact match letter by letter, within all folder names

@RealRaven2000
Copy link
Owner Author

Here is a first try version - taking out the ranking that's based on length (only if the full folder name is typed, it will show on top). So it should be sorted mainly by alphabet.

  • Every folder match starts at rank=1 (slightly higher than QF tabs which start with rank=0)
  • If the matched string is at the start of the folder name rank=rank+3 (+2 for tabs)
  • If the full name is matched rank=rank+4 with a tab and rank=rank+7 with a real folder
  • "in string" matches are only supported when at least 3 letters are entered. Parent folders are only matched from the start.

QuickFolders-wx-5.3pre27.zip

(to try out this version, download the zip file above and drag into Thunderbird Add-ons Manager)

@RealRaven2000 RealRaven2000 changed the title Improve search results list during quickMove Improve sorting of search results during quickMove / quickJump Feb 4, 2021
@RealRaven2000
Copy link
Owner Author

implemented in 5.3 and 4.20 - released 22/02/2021

@RealRaven2000 RealRaven2000 unpinned this issue Feb 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants