Skip to content

Commit 7bd1270

Browse files
authored
chore: Remove traces of identity rings in the mobile app (#22360)
Removes the identity ring (colorful ring around avatars) from the mobile client. status-go isn't going to be changed until status-desktop is updated as well. Why: there's general consensus that the ring colors are a flawed mechanism against impersonation. Further details in issue #21743 and original discussion in #20617. There's agreement from the Design team that the feature should be removed and Figma is either up-to-date without rings or is in the process of being updated. We are not attempting to resolve the impersonation problem right now. Eventually, we will return to the drawing board and come up with better solutions. Fixes #21743
1 parent c098b7e commit 7bd1270

File tree

28 files changed

+66
-157
lines changed

28 files changed

+66
-157
lines changed

src/legacy/status_im/subs/ens.cljs

-10
This file was deleted.

src/legacy/status_im/subs/root.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
(ns legacy.status-im.subs.root
22
(:require
33
legacy.status-im.subs.browser
4-
legacy.status-im.subs.ens
54
legacy.status-im.subs.mailservers
65
[re-frame.core :as re-frame]))
76

src/legacy/status_im/ui/components/chat_icon/screen.cljs

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
[quo.core :as quo]
1111
[re-frame.core :as re-frame.core]
1212
[react-native.core :as rn]
13-
[status-im.contexts.profile.utils :as profile.utils]
14-
[utils.ens.core :as utils.ens]))
13+
[status-im.contexts.profile.utils :as profile.utils]))
1514

1615
;;TODO REWORK THIS NAMESPACE
1716

@@ -62,9 +61,7 @@
6261
:indicator-border 0
6362
:indicator-color "#000000"
6463
:color (get text-style :color)
65-
:length 2
66-
:ring? (not (utils.ens/is-valid-eth-name? full-name))
67-
:ring-width 2})}
64+
:length 2})}
6865
{:size size}]
6966
[photos/photo photo-path {:size size}])
7067
(when-not community?
@@ -101,5 +98,3 @@
10198
:chat-icon (styles/custom-size-icon size)
10299
:default-chat-icon (styles/default-chat-icon-profile colors/default-chat-color size)
103100
:default-chat-icon-text (styles/default-chat-icon-text size)}])
104-
105-

src/quo/components/avatars/user_avatar/schema.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
[:static? {:optional true} [:maybe boolean?]]
1414
[:status-indicator? {:optional true} [:maybe boolean?]]
1515
[:online? {:optional true} [:maybe boolean?]]
16-
[:ring? {:optional true} [:maybe boolean?]]
1716
[:profile-picture
1817
{:optional true}
1918
[:maybe :schema.quo/profile-picture-source]]]]]

src/quo/components/avatars/user_avatar/style.cljs

+8-16
Original file line numberDiff line numberDiff line change
@@ -7,50 +7,42 @@
77
:status-indicator 12
88
:status-indicator-border 4
99
:status-indicator-center-to-edge 12
10-
:font-size :heading-1
11-
:ring-width 4}
10+
:font-size :heading-1}
1211
:size-64 {:dimensions 64
1312
:status-indicator 8
1413
:status-indicator-border 2
1514
:status-indicator-center-to-edge 6
16-
:font-size :heading-1
17-
:ring-width 2}
15+
:font-size :heading-1}
1816
:medium {:dimensions 48
1917
:status-indicator 8
2018
:status-indicator-border 2
2119
:status-indicator-center-to-edge 6
22-
:font-size :heading-2
23-
:ring-width 2}
20+
:font-size :heading-2}
2421
:small {:dimensions 32
2522
:status-indicator 8
2623
:status-indicator-border 2
2724
:status-indicator-center-to-edge 4
28-
:font-size :paragraph-2
29-
:ring-width 2}
25+
:font-size :paragraph-2}
3026
28 {:dimensions 28
3127
:status-indicator 0
3228
:status-indicator-border 0
3329
:status-indicator-center-to-edge 0
34-
:font-size :paragraph-2
35-
:ring-width 0}
30+
:font-size :paragraph-2}
3631
:xs {:dimensions 24
3732
:status-indicator 0
3833
:status-indicator-border 0
3934
:status-indicator-center-to-edge 0
40-
:font-size :paragraph-2
41-
:ring-width 2}
35+
:font-size :paragraph-2}
4236
:xxs {:dimensions 20
4337
:status-indicator 0
4438
:status-indicator-border 0
4539
:status-indicator-center-to-edge 0
46-
:font-size :label
47-
:ring-width 2}
40+
:font-size :label}
4841
:xxxs {:dimensions 16
4942
:status-indicator 0
5043
:status-indicator-border 0
5144
:status-indicator-center-to-edge 0
52-
:font-size :label
53-
:ring-width 2}})
45+
:font-size :label}})
5446

5547
(defn initials-avatar
5648
[size customization-color theme]

src/quo/components/avatars/user_avatar/view.cljs

+4-12
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,11 @@
2727
(utils.string/get-initials full-name amount-initials)]]))
2828

2929
(defn user-avatar-internal
30-
"Render user avatar with `profile-picture`
31-
32-
WARNING:
33-
When calling the `profile-picture-fn` and passing the `:ring?` key, be aware that the `profile-picture-fn`
34-
may have an `:override-ring?` value. If it does then the `:ring?` value will not be used.
35-
For reference, refer to the `utils.image-server` namespace for these `profile-picture-fn` are generated."
36-
[{:keys [full-name size profile-picture static? status-indicator? online? ring?]
30+
"Render user avatar with `profile-picture`."
31+
[{:keys [full-name size profile-picture static? status-indicator? online?]
3732
:or {size :big
3833
status-indicator? true
39-
online? true
40-
ring? true}
34+
online? true}
4135
:as props}]
4236
(let [theme (quo.context/use-theme)
4337
picture-config (:config profile-picture)
@@ -80,9 +74,7 @@
8074
:indicator-color indicator-color
8175
:theme theme
8276
:color (:color style/initials-avatar-text)
83-
:size (:width outer-styles)
84-
:ring? ring?
85-
:ring-width (:ring-width sizes)})}
77+
:size (:width outer-styles)})}
8678
(:uri profile-picture)
8779
profile-picture
8880

src/quo/components/list_items/preview_list/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
(case type
1919
:user [user-avatar/user-avatar
2020
(assoc item
21-
:ring? false
2221
:status-indicator? false
2322
:size user-avatar-size)]
2423

src/quo/components/messages/system_message/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
{:size :xxxs
3636
:full-name display-name
3737
:profile-picture photo-path
38-
:ring? false
3938
:status-indicator? false}]])
4039

4140
(defn split-text

src/quo/components/navigation/top_nav/view.cljs

+1-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@
8181
:accessibility-label :open-profile}
8282
[user-avatar/user-avatar
8383
(merge {:status-indicator? true
84-
:ring? true
8584
:customization-color customization-color
8685
:size :small}
8786
avatar-props)]])
@@ -136,7 +135,7 @@
136135
:qr-code-on-press callback
137136
:notification-count number
138137
:max-unread-notifications used to specify max number for counter
139-
:right-section-content
138+
:right-section-content
140139
"
141140
[{:keys [avatar-on-press avatar-props customization-color container-style] :as props}]
142141
[rn/view {:style (merge style/top-nav-container container-style)}

src/quo/components/share/qr_code/view.cljs

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@
2323
(assoc props
2424
:size :size-64
2525
:status-indicator? false
26-
:online? false
27-
:ring? false)]
26+
:online? false)]
2827

2928
:wallet-account
3029
[account-avatar/view (assoc props :size :size-64 :type :default)]

src/quo/components/tags/context_tag/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@
114114
:profile-picture profile-picture
115115
:size (if (= size 24) :xxs 28)
116116
:status-indicator? false
117-
:ring? false
118117
:customization-color customization-color}]]
119118

120119
:multiuser

src/quo/components/wallet/account_origin/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
(case type
2727
:default-keypair [user-avatar/user-avatar
2828
{:size :xxs
29-
:ring? false
3029
:customization-color customization-color
3130
:profile-picture profile-picture}]
3231
:recovery-phrase [icons/icon

src/quo/components/wallet/keypair/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
(if (= avatar-type :default-keypair)
2828
[user-avatar/user-avatar
2929
{:full-name full-name
30-
:ring? true
3130
:size :small
3231
:status-indicator? false
3332
:customization-color customization-color

src/schema/quo.cljs

+4-9
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,15 @@
1616
[:indicator-center-to-edge {:optional true} [:maybe :int]]
1717
[:theme :schema.common/theme]
1818
[:color :string]
19-
[:size :int]
20-
[:ring? :boolean]
21-
[:ring-width :int]])
19+
[:size :int]])
2220

2321
(def ^:private ?account-image-uri-options
2422
[:map
2523
[:port :int]
2624
[:ratio :double]
2725
[:key-uid :string]
2826
[:image-name :string]
29-
[:theme :schema.common/theme]
30-
[:override-ring? [:maybe :boolean]]])
27+
[:theme :schema.common/theme]])
3128

3229
(def ^:private ?initials-image-uri-options
3330
[:map
@@ -38,8 +35,7 @@
3835
[:theme :schema.common/theme]
3936
[:customization-color ?customization-color]
4037
[:key-uid {:optional true} [:maybe :string]]
41-
[:public-key {:optional true} [:maybe :string]]
42-
[:override-ring? {:optional true} [:maybe :boolean]]])
38+
[:public-key {:optional true} [:maybe :string]]])
4339

4440
(def ^:private ?contact-image-uri-options
4541
[:map
@@ -48,8 +44,7 @@
4844
[:ratio :double]
4945
[:image-name :string]
5046
[:public-key :string]
51-
[:theme :schema.common/theme]
52-
[:override-ring? [:maybe :boolean]]])
47+
[:theme :schema.common/theme]])
5348

5449
(def ^:private ?image-uri-config
5550
[:multi {:dispatch :type}

src/status_im/common/confirmation_drawer/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
{:full-name display-name
2020
:profile-picture photo-path
2121
:size :xxs
22-
:ring? false
2322
:status-indicator? false}]))
2423

2524
(defn extra-action-view

src/status_im/common/scalable_avatar/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@
1515
:online? online?
1616
:profile-picture profile-picture
1717
:status-indicator? true
18-
:ring? true
1918
:customization-color customization-color
2019
:size :big}]]))

src/status_im/contexts/chat/home/chat_list_item/view.cljs

+5-8
Original file line numberDiff line numberDiff line change
@@ -177,18 +177,16 @@
177177
preview-text]))
178178

179179
(defn avatar-view
180-
[{:keys [contact chat-id full-name color muted? image]}]
180+
[{:keys [contact chat-id full-name color image]}]
181181
[rn/view {:style {:justify-content :center}}
182182
(if contact ; `contact` is passed when it's not a group chat
183183
(let [online? (rf/sub [:visibility-status-updates/online? chat-id])
184184
photo-path (rf/sub [:chats/photo-path chat-id])]
185185
[quo/user-avatar
186-
(cond-> {:full-name full-name
187-
:size :small
188-
:online? online?
189-
:profile-picture photo-path}
190-
muted?
191-
(assoc :ring? false))])
186+
{:full-name full-name
187+
:size :small
188+
:online? online?
189+
:profile-picture photo-path}])
192190
[quo/group-avatar
193191
{:customization-color color
194192
:picture (when image {:uri image})
@@ -258,7 +256,6 @@
258256
:chat-id chat-id
259257
:full-name primary-name
260258
:color color
261-
:muted? muted
262259
:image image}]
263260
[rn/view {:style {:flex-shrink 1}}
264261
[rn/view {:style style/chat-data-container}

src/status_im/contexts/chat/messenger/composer/reply/view.cljs

+1-2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@
8787
primary-name)
8888
:profile-picture (or user-avatar photo-path)
8989
:status-indicator? false
90-
:size :xxxs
91-
:ring? false}]
90+
:size :xxxs}]
9291
[quo/text
9392
{:weight :semi-bold
9493
:size (if pin? :label :paragraph-2)

src/status_im/contexts/chat/messenger/messages/avatar/view.cljs

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[utils.re-frame :as rf]))
66

77
(defn avatar
8-
[{:keys [public-key size hide-ring?]}]
8+
[{:keys [public-key size]}]
99
(let [[primary-name _] (rf/sub [:contacts/contact-two-names-by-identity public-key])
1010
photo-path (rf/sub [:chats/photo-path public-key])
1111
online? (rf/sub [:visibility-status-updates/online? public-key])]
@@ -15,7 +15,6 @@
1515
:on-press #(rf/dispatch [:chat.ui/show-profile public-key])}
1616
[quo/user-avatar
1717
{:full-name primary-name
18-
:ring? (not hide-ring?)
1918
:profile-picture photo-path
2019
:online? online?
2120
:size size}]]]))

src/status_im/contexts/chat/messenger/messages/content/deleted/view.cljs

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
{:full-name display-name
2020
:profile-picture profile-picture
2121
:status-indicator? false
22-
:ring? false
2322
:size :xxxs}]]
2423
[quo/text
2524
{:weight :semi-bold

src/status_im/contexts/chat/messenger/messages/content/view.cljs

+4-9
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,13 @@
4444

4545
(defn avatar-container
4646
[{:keys [content last-in-group? pinned-by quoted-message from bridge-message]}
47-
hide-reactions? in-reaction-or-action-menu? show-user-info? in-pinned-view?]
47+
hide-reactions? in-reaction-or-action-menu? show-user-info?]
4848
(cond
4949
(:user-avatar bridge-message)
5050
[fast-image/fast-image
5151
{:source {:uri (:user-avatar bridge-message)}
5252
:fallback-content [quo/user-avatar
5353
{:full-name (bridge-message-user-name (:user-name bridge-message))
54-
:ring? false
5554
:online? false
5655
:status-indicator? false
5756
:size :small}]
@@ -69,8 +68,7 @@
6968
in-reaction-or-action-menu?)
7069
[avatar/avatar
7170
{:public-key from
72-
:size :small
73-
:hide-ring? (or in-pinned-view? in-reaction-or-action-menu?)}]
71+
:size :small}]
7472

7573
:else
7674
[rn/view {:padding-top 4 :width 32}]))
@@ -135,14 +133,12 @@
135133
{:full-name primary-name
136134
:profile-picture photo-path
137135
:status-indicator? false
138-
:size :xxxs
139-
:ring? false}]
136+
:size :xxxs}]
140137
[quo/text
141138
{:weight :semi-bold
142139
:style {:margin-left 4}}
143140
primary-name]]))
144141

145-
146142
(defn resolve-group-system-message
147143
[{:keys [children]}]
148144
(reduce (fn [acc {:keys [type literal]}]
@@ -285,8 +281,7 @@
285281
[rn/view
286282
{:style {:padding-horizontal 4
287283
:flex-direction :row}}
288-
[avatar-container message-data hide-reactions? in-reaction-or-action-menu? show-user-info?
289-
(:in-pinned-view? context)]
284+
[avatar-container message-data hide-reactions? in-reaction-or-action-menu? show-user-info?]
290285
(into
291286
(if hide-reactions?
292287
[gesture/scroll-view]

src/status_im/contexts/preview/quo/avatars/user_avatar.cljs

-3
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020
:type :boolean}
2121
{:key :status-indicator?
2222
:type :boolean}
23-
{:label "Identicon Ring (applies only when there's no profile picture)"
24-
:key :ring?
25-
:type :boolean}
2623
{:key :full-name
2724
:type :text}
2825
{:key :profile-picture

0 commit comments

Comments
 (0)