Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[HOLD] Sort project list alphabetically #8977

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
7 changes: 7 additions & 0 deletions src/extensions/default/RecentProjects/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ define(function (require, exports, module) {
}
});

templateVars.projectList.sort(function(a, b) {
// 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());
Copy link
Contributor

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}

});

return Mustache.render(ProjectsMenuTemplate, templateVars);
}

Expand Down