Details
Details
- Reviewers
tomek inka - Commits
- rCOMM225f99462576: [lib] Sort drawer items alphabetically
I tested the stack as follows:
- I tested both native and web
- I tested both normal communities and GENESIS
- I tested both uppercase and lowercase names
- I made sure the list of channels was the same before and after (only the order changed)
- I edited a name on web and made sure its appearance in the order changed
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
lib/utils/drawer-utils.react.js | ||
---|---|---|
14–23 ↗ | (On Diff #42140) | Type changes were necessary to make sure itemChildren is mutable on WritableCommunityDrawerItemData (so it can be sorted in place) |
lib/utils/drawer-utils.react.js | ||
---|---|---|
29–31 ↗ | (On Diff #42140) | Is this comparison a good idea for sorting? Can we use the same approach we're using in the rest of the codebase? |
lib/utils/drawer-utils.react.js | ||
---|---|---|
29–31 ↗ | (On Diff #42140) | Thanks! I got this solution from StackOverflow, didn't realize we already had a better approach in the codebase 😅 |
lib/utils/drawer-utils.react.js | ||
---|---|---|
29–31 ↗ | (On Diff #42140) | By using localeCompare, I was able to remove the toLowerCase call here as well! |