You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compare routine passed to the sort function for the Select2 fields on our submit ballot page returns where in the string the first instance of the search sequence appears. On Safari (and I believe Internet Explorer) JavaScript's sort function is stable, and provides "good" results. On Chrome, Texas Southern appears before Texas when searching.
I believe the correct fix here is to return the difference in IDs if the location of the query strings is the same.
The text was updated successfully, but these errors were encountered:
Right now we filter teams that have the search string in them, sorted by
position where that substring appears. That doesn't specify a sort order
for Texas and Texas Southern when the search string is Texas. Different
JavaScript implementations have different sort characteristics, some are
stable and some aren't.
Using Levenshtein distance ended up producing some weird results that I
can't really remember right now. Feel free to try it out again. If you need
any help getting a dev environment set up, file issues and we'll add to the
readme where appropriate.
The issue here is just to get behavior consistent across browsers and not
implementation dependent.
The compare routine passed to the sort function for the Select2 fields on our submit ballot page returns where in the string the first instance of the search sequence appears. On Safari (and I believe Internet Explorer) JavaScript's sort function is stable, and provides "good" results. On Chrome, Texas Southern appears before Texas when searching.
I believe the correct fix here is to return the difference in IDs if the location of the query strings is the same.
The text was updated successfully, but these errors were encountered: