[HOLD] Sort project list alphabetically #8977
base: master
Are you sure you want to change the base?
Conversation
Arquivos atualizados
Update files
Nice. I have this problem too. |
Well, I like the current order better. Maybe this should be a pref. |
// Changing the case (upper or lower) ensures a case insensitive sort | ||
var aFolder = a.folder.toLowerCase(); | ||
var bFolder = b.folder.toLowerCase(); | ||
return (aFolder < bFolder) ? -1 : (aFolder > bFolder) ? 1 : 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better use .localeCompare()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and .toLocaleLowerCase()
Oops, my bad! Now, using Ignore the "merge branch" stuff, I was working on my other outdated machine and I messed up everything there... |
brackets.getLocale()
// Changing the case (upper or lower) ensures a case insensitive sort | ||
var aFolder = a.folder.toLocaleLowerCase(); | ||
var bFolder = b.folder.toLocaleLowerCase(); | ||
return aFolder.localeCompare(bFolder, brackets.getLocale()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We usually use the options (3rd param) {numeric: true}
Added param for numeric sorting
This sounds good, but I'm with @marcelgerber and would rather this be a preference. :) |
Please add a preference for this setting, since this is and always will be a matter of taste. One other option to sort the list is by last time opened. Just a suggestion for future improvement. |
@ingorichter The list is already sorted by last time opened (by default). |
@marcelgerber good point, bad example. I wanted to make the point that there might be more options that would justify a preference. |
Adding "HOLD" indicator to title so we hold off on merging until a pref is added. The default should still be to sort by most-recently opened, as in current releases. |
@brunnopleffken Would you mind adding the preference for the sort option? It would be great to move forward with this PR. Thanks. |
@ingorichter Nice, I'll work on it... ;) |
@brunnopleffken I would like to see this in core, but the remaining issue (needs to be a pref) still needs to be addressed. Can you make that change soon? |
@brunnopleffken Hii.. Just wanted to know if you got the time to add the preference for it, so that it can be merged.. |
Really useful and missing feature if you are used to switch between multiple projects in a matter of minutes (like me) and have a lot of them. It sounds silly, but may save you some precious time and patience.