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
Separators Ignored (or Randomly Moving) #56
Comments
OK, I was able to reproduce the bug. |
I'm seeing weird things with separators. There might be a bug in Firefox. This needs more testing. |
Take a look at https://addons.mozilla.org/en-US/firefox/addon/sort-bookmarks-webext/ That developer fixed it quite quickly. |
Actually, separators are not being ignored. What I'm seeing is that the separator randomly moves, which causes the sorting to change. This is why I think it might be a Firefox issue. |
I concur. Personally, issue #54 is more urgent. |
It destroyed my bookmark order on several profiles before I realised it. Hope to see it fixed soon. As to "Sort Bookmarks" by heftig that one does not even sort alphabetically correctly. Not sure why that is happening though. |
I noticed that the issue with the separator occurs when moving bookmarks across separators. Folders in which bookmarks are not moved retain the state of their separators and sort correctly. After unchecking 'Auto sort' pref of the addon (and saving the prefs), I added separators in a folder and grouped the bookmarks in it by moving them across the separators. The bookmarks between the separators were not sorted. I then checked 'Auto sort' (and saved). Within seconds the bookmarks in the folder got sorted correctly, with the separators intact. Then, with 'Auto sort' still checked, I added a bookmark in the folder, which got appended at the bottom as expected. |
@akwala Thanks for the report. Here's what I'm seeing when existing bookmarks are moved either above or below (across) a separator, while auto-sort is enabled, the net result is the separator ends up getting moved to the top and the bookmarks below. I also noticed this doesn't always happen and appears to be timed based which makes me wonder if there might be a cache problem. It's going to take more debugging to narrow down. I'll look into this once I finish the exclude-folders feature. |
(btw, I haven't forgotten about this issue.) The problem appears to be auto-sort sorting while a bookmark is being dragged. There are two possible workarounds:
It would be nice if FF told me when a bookmark is being dragged, but I'm not aware of an API for this. My next step will be to search for such an API. If not, then I don't have an alternative and I'm open to suggestions. |
If auto-sort and changes outside auto-sort can be made never to overlap then this seems better because it does not depend on a user preference. However, if this requires significant additional coding, it may not be worth introducing more complexity and bug possibilities if the second option is adequate.
I've enabled auto-sort with an inactivity wait of 180 sec (3 min). I'll report back on how that goes. Update: With inactivity wait of 180 sec auto-sort doesn't happen immediately but, when it does, bookmarks and separators end up in positions other than those set:
|
Here's what I'm seeing. I have a folder with many bookmarks in the section following the last separator, At one point I created a new separator above it, and moved about half the bookmarks to the section above the separator. I noticed a few stragglers stayed in the bottom section, so had to move them again. But here's the weird symptom I've noticed since. I'll save a new bookmark, which FF puts in the bottom section as expected. I then drag it up above the separator, and it stays. But one bookmark already above the separator jumps down to the bottom section. I then drag the latter bookmark up, but the first bookmark jumps down. I keep dragging "A" and "B" up, but the other jumps back. The only way I can circumvent this is to turn off the extension while doing a move, which forces me to sort visually. If I create another bookmark "C" and drag it up, then either "A" or "B" will jump back down. It seems that the same couple of bookmarks are the ones most often affected. I wish this problem could be prioritized. I see that it was reported a few versions back, and it is quite irritating, |
I apparently found a work-around. I inserted a new separator just above the one that was sometimes being ignored. I tried adding a bookmark to the bottom section, and no problem occurred. Then I deleted the original separator, and experimented with more bookmarks. The problem seems to have cleared up. Apparently the original separator was somehow "poisoned" and porous to some bookmarks, But the new separator seems to be "solid". |
I'm unable to get the add-on working with any combination of new or old separators, folders containing other folders or not. Output is seemingly random -- sometimes it sorts the separator to the bottom, sometimes it tosses it in the middle for no reason, but it never does what you'd expect. Can you take another look at this, Eric? |
I think you've diagnosed it by acknowledging that the failure (or lack) is random, with each separator created. I've circumvented it by creating a new separator above the bad one, and then deleting the bad one. But while this often works, it doesn't fix the problem. Good luck on an eventual solution. |
I have no idea if it's relevant here, but whenever I see an issue report involving sorted items moving randomly, the cause is often due to an artifact of how the sort algorithm handles equally weighted items. For example, if you alphabetically (case-insensitive) sort the following list:
a valid result can be either:
or
If the code doesn't handle equally-weighted items with consistency, the bananas can sometimes shift position during sorting, which appears random to the user. Again, I have no idea if this helps explain what is going on here, but I've seen it enough times with other code that I thought it worthwhile to take the time to write this post. |
It’s been awhile but list time I checked, it was a timing issue. When I did
a drag-n-drop, it started sorting before I dropped.
I need to run some tests.
…On Fri, Jan 20, 2023 at 6:57 PM Gitoffthelawn ***@***.***> wrote:
I have no idea if it's relevant here, but whenever I see an issue report
involving sorted items moving randomly, the cause is often due to an
artifact of how the sort algorithm handles equally weighted items.
For example, if you alphabetically (case-insensitive) sort the following
list:
apple
cherry
Banana
banana
a valid result can be either:
apple
Banana
banana
cherry
or
apple
banana
Banana
cherry
If the code doesn't handle equally-weighted items with consistency, the
bananas can sometimes shift position during sorting, which appears random
to the user.
Again, I have no idea if this helps explain what is going on here, but
I've seen it enough times with other code that I thought it worthwhile to
take the time to write this post.
—
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGRCMPOH4HC2E3P3DQPQI3WTNGBZANCNFSM4EFL4YNA>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
Makes sense too! |
As it is now (3.0), separators are being ignored. Please correct this.
Thanks.
The text was updated successfully, but these errors were encountered: