Closed Kaz-ookid closed 2 months ago
Also, now that I'm looking at the screenshots, perhaps it's better to have the username using underscores or capitalized letters so the 2 words are more easily recognizable e.g. HomeSoldier0864, or home_soldier_0864, or any other fancy way of splitting the 2 words that you may prefer
Also, now that I'm looking at the screenshots, perhaps it's better to have the username using underscores or capitalized letters so the 2 words are more easily recognizable e.g. HomeSoldier0864, or home_soldier_0864, or any other fancy way of splitting the 2 words that you may prefer
I'll check with FE1 and modify before merging
edit : we decided to go for the capitalized version : HomeSoldier0864
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
70.9% Coverage on New Code
0.0% Duplication on New Code
Oh too late, it was merged while I was reviewing it
PR Description
Context
Throughout the app, users were previously referred to by their PoP Token, which was not user-friendly. This PR implements a deterministic username system to improve the user experience. A detailed documentation of the project's idea and motivations is to be found in #1915. It is recommended to read it before diving into this PR.
Summary of Changes
This PR implements the deterministic username system across various parts of the app, ensuring a consistent and user-friendly display of usernames derived from PoP Tokens. The changes have been done in collaboration with FE2 (#1918) to ensure consistency throughout both systems.
General Changes
PublicKey
class now includes thegetUsername()
function, returning the username version of the hash.GeneralUtils
. The usernames are a concatenation of two mnemonics words, and a 4 digits number. The number corresponds to the 4 first digits in a token's hash, starting from the leftExample:
token :
d_xeXEsurEnyWOp04mrrMxC3m4cS-3jK_9_Aw-UYfww=
mnemonics words generated form the hash :spoon
,issue
first 4 digits :0434
final username :spoonissue0434
Token
Social Media
Roll Call
RollCallArrayAdapter
to include two TextViews per item, and enhancing the class overall.Digital Cash
PublicKey
instead ofString
(token hashes).PublicKey
. Also, it juste made no sense to label this public key under a username anyway.Bugs and Documentation
Screenshots
Token fragment displaying the username.![username_token](https://github.com/dedis/popstellar/assets/100324323/a314d330-f892-4e3c-9da6-a8c4483f6d4a)
Chirps feed displaying the username.![image](https://github.com/dedis/popstellar/assets/100324323/cc93930f-99d6-40ce-bdaf-602ffb37d751)
Roll call displaying the username.![username_rollcall](https://github.com/dedis/popstellar/assets/100324323/6f79bc8a-fa78-402b-8131-4216e040b5ea)
Digital cash sending activity displaying the username.![image](https://github.com/dedis/popstellar/assets/100324323/95337e85-10c9-4a82-899c-c3b0ce6d2bde)
Digital cash receipt activity displaying the username.![username_receipt](https://github.com/dedis/popstellar/assets/100324323/561421d3-b8e4-46cf-a3b1-850199bea0f8)
Digital cash transaction history activity displaying the username and the organizer hash.![username_transactions](https://github.com/dedis/popstellar/assets/100324323/9b6c185d-9f17-4a90-928d-9469fe06bcca)
Digital cash issuing activity.![image](https://github.com/dedis/popstellar/assets/100324323/c85ab41e-b6c7-4898-a2c9-739a2124b50c)
Bugged UI in transaction history showing the corrected title and value (now fixed).![image](https://github.com/dedis/popstellar/assets/100324323/00ad32bf-5c89-4331-b720-edb949df39db)