Skip to content

DMs are sorted asciibetically #9253

@Lemmmy

Description

@Lemmmy

Description:

DMs in the room list are sorted asciibetically instead of alphabetically. This makes it harder to find users in a long DM list. Asciibetically means uppercase letters appear before lowercase letters, for example:

AUser1
BUser3
CUser5
auser2
buser4
cuser6

Should instead be sorted:

AUser1
auser2
BUser3
buser4
CUser5
cuser6

Asciibetical sorting can result in unnatural sorting in non-English languages, especially CJK ones, too.

There are packages that provide natural sorting (1, 2). A naïve way to achieve similar results (generally for latin only) is to convert to lowercase while sorting.

Server Setup Information:

  • Version of Rocket.Chat Server: 0.60.0-develop (5de3446)
  • Operating System: Ubuntu 16.04
  • Deployment Method(snap/docker/tar/etc): Built from scratch, run under pm2
  • Number of Running Instances: 2
  • Node Version: 8.2.1

Steps to Reproduce:

  1. Create DMs with two users, where one's name starts with a lowercase letter, and the other starts with an uppercase letter

Expected behavior:

  1. List should be sorted alphabetically (AaBbCcDd...) instead of asciibetically (ABCDabcd...)

Actual behavior:

  1. List is sorted asciibetically (ABCDabcd...) instead of alphabetically (AaBbCcDd...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions