Skip to content

[#21924] Fix onboarding display name and picture #22118

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

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

ulisesmac
Copy link
Contributor

@ulisesmac ulisesmac commented Feb 14, 2025

fixes #21924
fixes #21827

Related status-go PR:

Summary

This PR fixes:

  • The default display-name shown everywhere in the app to be the compressed key with an ellipsis:
    image

  • Updates the avatar icon shown for the default display name:
    image

Note: The new alias is only shown for new contacts/profiles when the display-name cannot be fetched, old ones will stilll use the 3-words name one

Demo:

Screencast.From.2025-02-14.12-01-15.mp4

Platforms

  • Android
  • iOS

Steps to test

  • Open Status
  • Generate a new profile
  • The new profile image along with the default name will be shown
  • When upadating the name, the validations are properly triggered

status: ready

Comment on lines -159 to -174
(def ^:const temp-display-name
"While creating a profile, we cannot use an empty string; this value works as a
placeholder that will be updated later once the compressed key exists. See
`status-im.contexts.profile.edit.name.events/get-default-display-name` for more details."
"temporal username")

(rf/reg-event-fx
:onboarding/use-temporary-display-name
(fn [{:keys [db]} [temporary-display-name?]]
{:db (assoc db
:onboarding/profile
{:temporary-display-name? temporary-display-name?
:display-name (if temporary-display-name?
temp-display-name
"")})}))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this and related code because now the display-name is allowed to be empty, in that case, the alias is shown. The new alias is the compressed key with ellipsis

Comment on lines +79 to +83
(defn default-display-name?
[display-name]
(and (some? display-name)
(or (= display-name "")
(string/includes? display-name "…"))))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added this predicate to show the default profile picture when it returns true

@status-im-auto
Copy link
Member

status-im-auto commented Feb 14, 2025

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
8beb96a #1 2025-02-14 19:39:20 ~6 min tests 📄log
✔️ 8beb96a #1 2025-02-14 19:41:01 ~8 min android-e2e 🤖apk 📲
✔️ 8beb96a #1 2025-02-14 19:44:11 ~11 min android 🤖apk 📲
✔️ 8beb96a #1 2025-02-14 19:44:44 ~12 min ios 📱ipa 📲
0cd94c1 #2 2025-02-14 19:49:52 ~4 min tests 📄log
✔️ 0cd94c1 #2 2025-02-14 19:51:47 ~6 min android-e2e 🤖apk 📲
✔️ 0cd94c1 #2 2025-02-14 19:53:29 ~8 min android 🤖apk 📲
✔️ 0cd94c1 #2 2025-02-14 19:54:26 ~9 min ios 📱ipa 📲

Copy link
Contributor

@ilmotta ilmotta left a comment

Choose a reason for hiding this comment

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

Left minor comments in the related Go PR, but apart from that LGTM


(defn default-display-name?
[display-name]
(and (some? display-name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: The result of some? is guaranteed to be a boolean, but in most cases it's not needed. Here could be just (and display-name ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, some? is just not + nil, IDK, just wanted to use it. I'll change it :)

Copy link
Member

@seanstrom seanstrom left a comment

Choose a reason for hiding this comment

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

Nice stuff ✅
Thank you!

@pavloburykh
Copy link
Contributor

@ulisesmac thanks for the PR. Could you please rebase both status go and mobile PRs and update mobile PR so it points latest go commit? Once it is done, please move PR to E2E column in order QAs can pick it up.

@VolodLytvynenko VolodLytvynenko moved this from REVIEW to E2E Tests in Pipeline for QA Mar 14, 2025
@VolodLytvynenko VolodLytvynenko moved this from E2E Tests to REVIEW in Pipeline for QA Mar 14, 2025
@VolodLytvynenko
Copy link
Contributor

hi @ulisesmac just pinging you in case you missed the comment :)

@ulisesmac
Copy link
Contributor Author

@pavloburykh @VolodLytvynenko

Sorry, I actually missed the first comment, but this PR is stuck waiting for the feature impl. on Desktop, context: https://discord.com/channels/1210237582470807632/1346475491414245417/1347188157246079078

I'll ping you once the PR is unlocked. Thank you!

cc: @igor-sirotin @ilmotta

@churik churik added the blocked label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: REVIEW
7 participants