-
Notifications
You must be signed in to change notification settings - Fork 324
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
fix: truncate no. of peers to unit of "k" when > 999 #1053
fix: truncate no. of peers to unit of "k" when > 999 #1053
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
sorry that my code didn't pass the test for JS lint, has fixed by using standard JS lint and pushed. Thanks for reviewing! |
Not a problem. Thanks so much for the contribution! I touched up the code a tiny bit and am giving it my approval now. |
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.
Thank you, works as expected, needs linter fix tho.
#1017
About
The issue opener found out that when number of peers is 1000 or above, the last digit might be partially invisible and cause confusion due to the badge's max width.
The core team replied to the issue suggesting to truncate it in the format of "1k", "2k". So I implemented the approach and made this PR.
Original UI
Committed UI Change
Show full number when < 999
This is my first PR, please let me know if I could do it better, looking forward to help with other tasks of this repo and IPFS!