Closed BOZG closed 2 years ago
Hiya @BOZG - Thanks for your suggestion :) I agree, it would make more sense for sorting to be non-case sensitive. It was probably a mistake that it isn't currently case sensitive, and I hadn't noticed since all my links start with a capital. I will implement the change this week, and update you here when done :)
This issue has been marked as a good first issue for first-time contributors to implement! This is a great way to support the project, while also improving your skills, you'll also be credited as a contributor once your PR is merged. If you're new to web development, here are a collection of resources to help you get started. You can also find step-by-step tutorials for common tasks within Dashy, on the Dev Guides page. If you need any support at all, feel free to reach out via GitHub Discussions.
I am a bot, and this is an automated message 🤖
I can make this change either later this evening, or tomorrow. Unless anyone else would like to pick it up, this should be a pretty easy task to implement, sorting is done within the Section component:
So using toLowerCase()
within the sort function should mean titles can be effectively compared. Something like this:
sortAlphabetically(items) {
return items.sort((a, b) => (a.title.toLowerCase() > b.title.toLowerCase() ? 1 : -1));
},
The reverse-alphabetical sort uses the same method, and then just reverses the order, so the change is only needed in one place.
Implemented in #354 :)
Is your feature request related to a problem? If so, please describe.
Choosing "alphabetical" as the "Sort by" option is case sensitive meaning that 'A' and 'a' are not sorted together.
Describe the solution you'd like
If feasible, an option to ignore case sensitivity when sorting alphabetically would be nice. Just making sorting case insensitive doesn't strike me as an alternative as I'm sure there are others out there who prefer sorting as it is.
This is obviously a very personal peeve and easily mitigated by me renaming services so I don't expect it to be a priority in any way.
Priority
Low (Nice-to-have)
Is this something you would be keen to implement
No response