~emersion/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH gamja] sort member-list with localeCompare

Details
Message ID
<3ad3079598ff188305a4.1659217379@freefall>
DKIM signature
missing
Download raw message
Patch: +1 -1
The difference in case sensitivity is the most obvious change with
servers like soju that support CASEMAPPING ascii and
rfc1459. Currently the list:
  'Alpha', 'aardvark', 'Charlie', 'comma'
currently sorts to:
  'Alpha', 'Charlie', 'aardvark', 'comma'
with this change it will instead become:
  'aardvark', 'Alpha', 'Charlie', 'comma'

If something like RFC 7613 gets broader support then there are a few
more differences for a list like:
  'éclair', 'ecstatic, 'aardvark', 'zed', 'Gamma'
currently sorts to:
  'Gamma', 'aardvark', 'ecstatic', 'zed', 'éclair'
with this patch would instead sort to:
  'aardvark', 'éclair', 'ecstatic', 'Gamma', 'zed'

The above examples were run with a locale unspecified which fell back
to my browser/host default of 'en'.

diff --git a/components/member-list.js b/components/member-list.js
--- a/components/member-list.js
+++ b/components/member-list.js
@@ -101,7 +101,7 @@ function sortMembers(a, b) {
		return i - j;
	}

	return nickA < nickB ? -1 : 1;
	return nickA.localeCompare(nickB);
}

export default class MemberList extends Component {

[gamja/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CLTBHNB0W0BC.3VBM6YIT0V78T@cirno>
In-Reply-To
<3ad3079598ff188305a4.1659217379@freefall> (view parent)
DKIM signature
missing
Download raw message
gamja/patches/.build.yml: SUCCESS in 41s

[sort member-list with localeCompare][0] from [Nolan Prescott][1]

[0]: https://lists.sr.ht/~emersion/public-inbox/patches/34316
[1]: mail@nprescott.com

✓ #813302 SUCCESS gamja/patches/.build.yml https://builds.sr.ht/~emersion/job/813302
Details
Message ID
<qKYIFmEBLK2F9PSRpB8aRPFbFtMAD5WlhPxSbkBSO6qTvpJmciPfx3sc67Tv1L9ZwRxT3u-ujtDhn5bDbQ660JZcUlbAavUgoY8H20fKyOA=@emersion.fr>
In-Reply-To
<3ad3079598ff188305a4.1659217379@freefall> (view parent)
DKIM signature
missing
Download raw message
Makes sense. Maybe we should do the same in compareBuffers()?
Reply to thread Export thread (mbox)