up-for-grabs.net icon indicating copy to clipboard operation
up-for-grabs.net copied to clipboard

Adjust Sorting for Website "Filter by Label" field dropdown.

Open CxGainz opened this issue 2 years ago • 5 comments
trafficstars

I'm very new to JS so I apologize in advance for my unconventional code. Something I noticed when browsing the website is that the dropdown that pops up when you click the "Filter by Label" field has two label options that start with colons before the label options that begin with the letter "A" appear. An example being the ": gift: BEGINNER" option which I believe the : gift: was supposed to show up as an emoji. The code I included makes it so that labels that begin with non-letters will be shoved to the bottom of the dropdown so the alphabetical "a/A" labels show up first. This was tested with Docker on Google Chrome on Windows 10. I wanted to point out what would happen if too many project owners inputted incorrect label options, it could clutter this list.

CxGainz avatar Nov 24 '22 08:11 CxGainz

Cicivkvkcic

soufainmohamd avatar Nov 25 '22 00:11 soufainmohamd

M kcjcucic

soufainmohamd avatar Nov 25 '22 00:11 soufainmohamd

@CxGainz apologies for the delay in getting to this - the changes seem fine, but it feels weird to be doing this processing each time this method runs, and I wonder if there's a different place we can do this sorting so it's done once. I'd also like to understand more about the "we render strange characters in the select inputs" case and what we might do to make this experience better, which may affect how this area works.

I need time to think about this, and sadly my time to do this sort of thing has been limited over the previous months...

shiftkey avatar Aug 27 '23 21:08 shiftkey

:wave: I'm a robot checking the state of this pull request to save the human reviewers time. I don't see any changes under _data/projects/ so I don't have any feedback here.

As you make changes to this pull request, I'll re-run these checks.

shiftbot avatar Aug 10 '24 18:08 shiftbot

npm run prettier-fix will fix this:

Checking formatting...
[warn] javascripts/projectsService.js
[warn] Code style issues found in the above file. Run Prettier with --write to fix.

shiftkey avatar Aug 10 '24 20:08 shiftkey