• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
leading space character in Collection creates new Collection when adding song
#1
Ran into a strange issue today. Here's generally how this happened, and there is a video that shows it:

1. Create a collection and put songs in it
2. Add a space character to the beginning of the collection name to make it sort to the top
3. Go find a new song you want to add
4. "Edit" the song
5. Start typing the desired collection in the Collections field, and then select it using auto-complete
6. Save the edits
7. Go back to the Collections tab and notice that it has created a NEW collection WITHOUT the leading space character, and put the requested song into that, rather than adding the song to the existing collection.

This video shows it:

https://www.dropbox.com/s/l2wubz9c1ufwna...d.mov?dl=0

The problem doesn't seem to manifest if, instead of Editing the song, I use triple-dot > Add To Collection. But sometimes, instead of adding multiple songs to one collection, I'm trying to make multiple edits to a single song, so I like using this feature.

Thanks in advance!

Dave
Reply
#2
The code was trimming the input, so that's why that behavior was occurring. I'm still going leave the trimming behavior in there when typing in values, because far too often users would leave spaces at the start or end and then complain when they had multiple instances of a specific group type, or cite issues with synchronizing due to having created multiple groups that only differed by a space. However, when picking from the auto-completion entry, I will allow honor whatever value was selected and not trim it. My preference would actually be to just always trim the names so that you couldn't enter a space when creating a new collection, but some users may be relying on that, so I won't remove it. It seems like it would be better to have a character that is easier to see though, like a period, underscore, etc. It's just far too easy for users to be confused by spaces, especially at the start.

Mike
Reply
#3
(04-11-2023, 05:47 PM)Zubersoft Wrote: The code was trimming the input, so that's why that behavior was occurring. I'm still going leave the trimming behavior in there when typing in values, because far too often users would leave spaces at the start or end and then complain when they had multiple instances of a specific group type, or cite issues with synchronizing due to having created multiple groups that only differed by a space. However, when picking from the auto-completion entry, I will allow honor whatever value was selected and not trim it. 

Yes! I totally agree with all of this.

(04-11-2023, 05:47 PM)Zubersoft Wrote: My preference would actually be to just always trim the names so that you couldn't enter a space when creating a new collection, but some users may be relying on that, so I won't remove it. It seems like it would be better to have a character that is easier to see though, like a period, underscore, etc. It's just far too easy for users to be confused by spaces, especially at the start.

Yes, I also agree that spaces are confusing and not the ideal choice. 

I just tried a leading period, and it seems to get ignored by the sorting algorithm. Underscore is the same. 

If I deselect the Normalize Characters setting, these sorting problems go away, and I can use a leading underscore, and those sort to the top. But I don't want to lose the feature where Danço sorts like Danco. Personally, I don't think underscore belongs in that same class of characters. Maybe there could be a separate setting for "Strip Extraneous Punctuation", and if people really want to strip or ignore underscores or periods, they can enable that; but then Normalize Characters can be reserved for real diacritical marks, and not punctuation. That would solve this problem without having to use leading space characters. 

That's just an idea.
Reply
#4
Yes, I added an issue to my bug tracking system to have a separate option for handling punctuation when sorting and searching. So it's something I will eventually address.

Mike
Reply
#5
Great minds! Thanks!
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.