New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#9207] Sort school names for userMapData.json #9269
[#9207] Sort school names for userMapData.json #9269
Conversation
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.
While array.sort()
works and is the most straightforward way to sort items, it is also taking into account case sensitivity, which results in many out-of-expectation ordering. Can you tweak your sorting script a bit to make it case insensitive?
Done! |
ee24bd1
to
8fbf837
Compare
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.
Also, can you put the script you used at the root project folder? Preferable if the script updates the file in-place, i.e. after running node sort-usermap
(or whatever name you used) I only need to commit and not copy-pasting.
Done for both. Should I document about the script somewhere? |
@monmanuela No need to do anything with the script for now; it's good enough where it is. |
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.
LGTM, thanks for your contribution!
Fixes #9207
PR Checklist
Ensure that you have:
master
andrelease
./gradlew lint
andnpm run lint
Outline of Solution
Following @wkurniawan07 's suggestion here, I used javascript's Array.sort() method to reorder the school names for each country.