Skip to content
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

Open
Taurean75 opened this issue Nov 26, 2017 · 17 comments
Open

Separators Ignored (or Randomly Moving) #56

Taurean75 opened this issue Nov 26, 2017 · 17 comments
Assignees
Labels
Priority: 3-Medium Has the potential to affect progress Status: Pending The issue has been assigned but is not currently being worked on Type: Bug The issue documents a broken, incorrect, or confusing feature behavior

Comments

@Taurean75
Copy link

Taurean75 commented Nov 26, 2017

As it is now (3.0), separators are being ignored. Please correct this.

Thanks.

@eric-bixby
Copy link
Owner

eric-bixby commented Nov 26, 2017

OK, I was able to reproduce the bug.

@eric-bixby eric-bixby self-assigned this Nov 26, 2017
@eric-bixby eric-bixby added Priority: 3-Medium Has the potential to affect progress Status: Pending The issue has been assigned but is not currently being worked on Type: Bug The issue documents a broken, incorrect, or confusing feature behavior labels Nov 26, 2017
@eric-bixby eric-bixby added this to the 3.1 milestone Nov 29, 2017
@eric-bixby
Copy link
Owner

I'm seeing weird things with separators. There might be a bug in Firefox. This needs more testing.

@Taurean75
Copy link
Author

Take a look at https://addons.mozilla.org/en-US/firefox/addon/sort-bookmarks-webext/

That developer fixed it quite quickly.

@eric-bixby eric-bixby changed the title Separators Ignored Separators Ignored (or Randomly Moving) Dec 4, 2017
@eric-bixby
Copy link
Owner

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.

@Taurean75
Copy link
Author

I concur. Personally, issue #54 is more urgent.

@eric-bixby eric-bixby modified the milestones: 3.1, 3.2 Dec 4, 2017
@TimidScript
Copy link

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.

@akwala
Copy link

akwala commented Dec 11, 2017

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. This time 10+ minutes passed before the bookmarks got auto-sorted, but the sorting was correct and the separators remained intact.

@eric-bixby
Copy link
Owner

@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.

@eric-bixby eric-bixby removed this from the 3.2 milestone Jan 3, 2018
@eric-bixby
Copy link
Owner

(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:

  1. disable auto-sort while moving.
  2. increase the preference to wait before auto sorting.

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.

@akwala
Copy link

akwala commented Sep 28, 2018

1. disable auto-sort while moving.

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.

2. increase the preference to wait before auto sorting.

This could be adequate. It might help to increase the lower limit to, say, 30 seconds. I can't think of a reason to have as short a wait as the current minimum of 5 sec. The maximum of 255 sec, or 4.25 minutes, should be fine though a higher max would be useful if one is doing a substantial reorg of one's bookmarks.

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:

  • Relocating an entire section between separators within a folder, and deleting/adding separators, was not affected by auto-sort, which is expected behavior.
  • Auto-sort after moving bookmarks between separators caused the bookmarks and separators to end up in seemingly random positions.

@Wizardgoat
Copy link

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,

@Wizardgoat
Copy link

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".

@blackwind
Copy link

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?

@Wizardgoat
Copy link

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.

@Gitoffthelawn
Copy link
Contributor

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.

@eric-bixby
Copy link
Owner

eric-bixby commented Jan 21, 2023 via email

@Gitoffthelawn
Copy link
Contributor

Makes sense too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: 3-Medium Has the potential to affect progress Status: Pending The issue has been assigned but is not currently being worked on Type: Bug The issue documents a broken, incorrect, or confusing feature behavior
Projects
None yet
Development

No branches or pull requests

7 participants