Skip to content
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

Peers tab: Natural address sorting #909

Merged
merged 1 commit into from
Dec 14, 2018
Merged

Conversation

riptl
Copy link
Contributor

@riptl riptl commented Dec 13, 2018

The peers in the tab are currently lexicographically sorted, meaning that instead of a listing like this:

/ipfs/12.2.3.4/…
/ipfs/21.2.3.4/…
/ipfs/100.2.3.4/…

this is displayed instead:

/ipfs/100.2.3.4/…
/ipfs/12.2.3.4/…
/ipfs/21.2.3.4/…

This patch sorts the peers using the localeCompare function with numeric: true to solve this.

@anacrolix
Copy link

Is that an IPFS timeout in the CI?

@riptl
Copy link
Contributor Author

riptl commented Dec 14, 2018

@anacrolix Yes, seems like the other PRs also get this error.

@olizilla
Copy link
Member

Neat! I've nudged CI and all is well. I agree, having a numeric sensitive sort on multiaddrs makes the list feel more coherent.

screenshot 2018-12-14 at 10 20 30

Copy link
Member

@olizilla olizilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@olizilla olizilla merged commit 3b7b1a3 into ipfs:master Dec 14, 2018
@olizilla olizilla mentioned this pull request Jul 23, 2019
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants